File: command-line.markdown

package info (click to toggle)
ruby-compass 0.12.2~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,308 kB
  • sloc: ruby: 10,474; makefile: 42; xml: 14
file content (142 lines) | stat: -rw-r--r-- 3,449 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
---
title: Compass Command Line Documentation
layout: tutorial
classnames:
  - tutorial
---
Compass Command Line Documentation
==================================

This page lists the compass commands you can use to set up and manage your project.

You may also find one of these walk throughs useful:

* HOWTO: [Compile your stylesheets for production](/help/tutorials/production-css/)

<!--
Extensions Commands
-------------------

### install a global extension. probably requires sudo.

    compass extension install extension_name 

### install an extension into a project
    compass extension unpack extension_name [path/to/project]

### uninstall a local or global extension. global extensions will require sudo.

    compass extension uninstall extension_name [path/to/project]

### list the extensions in the project

    compass extensions list

### list the extensions available for install

    compass extensions available
-->

Project Commands
----------------
<a name="create"/>
### Create a new compass project

    compass create path/to/project [--using blueprint] [--sass-dir=sass ...] [--project-type=rails]

<a name="init"/>
### Initialize an existing project to work with compass

    compass init rails path/to/project [--using blueprint]

<a name="install"/>
### Install a pattern from an extension into a project

    compass install blueprint/buttons [path/to/project]

<a name="compile"/>
### Compile the project's sass files into css

    compass compile [path/to/project]

<a name="watch"/>
### Watch the project for changes and compile whenever it does

    compass watch [path/to/project]

<a name="config"/>
### Emit a configuration file at the location specified.

    compass config [path/to/config] [--sass-dir=sass --css-dir=css ...]

<a name="validate"/>
### Validate the generated CSS.

    compass validate [path/to/project]

Misc commands
-------------

<a name="grid-img"/>
### Generate a background image that can be used to verify grid alignment

    compass grid-img W+GxH [path/to/grid.png]

Where:
<dl class="table">
  <dg><dt><code>W</code> = </dt><dd>Width of 1 column in pixels.</dd></dg>
  <dg><dt><code>G</code> = </dt><dd>Width of 1 gutter in pixels.</dd></dg>
  <dg><dt><code>H</code> = </dt><dd>Height of the typographic baseline in pixels.</dd></dg>
</dl>
Examples:

    # 40px column, 10px gutter, 20px height at <images_dir>/grid.png
    compass grid-img 40+10
    # 40px column, 20px gutter, 28px height at <images_dir>/grid.png
    compass grid-img 40+20x28
    # 60px column, 20px gutter, 28px height at images/wide_grid.png
    compass grid-img 60+20x28 images/wide_grid.png

<a name="interactive"/>
### Enter into a console for testing SassScript in a compass environment.

    compass interactive

<a name="stats"/>
### Print out statistics about your stylesheets

    compass stats

<a name="version"/>
### Emit the version of compass

    compass version

<a name="unpack"/>
### Unpack a framework or extension into your project

    compass unpack <extension>

Get Help on the Command Line
----------------------------

<a name="help"/>
### Get help on compass

    compass help

<a name="help-extension"/>
### Get help on an extension

    compass help extension_name

<a name="help-pattern"/>
### Get help about an extension pattern

    compass help extension_name/pattern_name

<a name="help-command"/>
### Get help about a particular sub command

    compass help command_name