2010-05-01 22:24:28 +00:00
|
|
|
---
|
|
|
|
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:
|
|
|
|
|
2010-11-22 01:30:41 +00:00
|
|
|
* HOWTO: [Compile your stylesheets for production](/help/tutorials/production-css/)
|
2010-05-01 22:24:28 +00:00
|
|
|
|
|
|
|
<!--
|
|
|
|
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
|
|
|
|
----------------
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="create"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Create a new compass project
|
|
|
|
|
|
|
|
compass create path/to/project [--using blueprint] [--sass-dir=sass ...] [--project-type=rails]
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="init"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Initialize an existing project to work with compass
|
|
|
|
|
|
|
|
compass init rails path/to/project [--using blueprint]
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="install"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Install a pattern from an extension into a project
|
|
|
|
|
|
|
|
compass install blueprint/buttons [path/to/project]
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="compile"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Compile the project's sass files into css
|
|
|
|
|
|
|
|
compass compile [path/to/project]
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="watch"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Watch the project for changes and compile whenever it does
|
|
|
|
|
|
|
|
compass watch [path/to/project]
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="config"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Emit a configuration file at the location specified.
|
|
|
|
|
|
|
|
compass config [path/to/config] [--sass-dir=sass --css-dir=css ...]
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="validate"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Validate the generated CSS.
|
|
|
|
|
|
|
|
compass validate [path/to/project]
|
|
|
|
|
|
|
|
Misc commands
|
|
|
|
-------------
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="grid-img"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Generate a background image that can be used to verify grid alignment
|
|
|
|
|
|
|
|
compass grid-img W+GxH [path/to/grid.png]
|
|
|
|
|
2010-11-01 07:43:21 +00:00
|
|
|
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
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="interactive"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Enter into a console for testing SassScript in a compass environment.
|
|
|
|
|
|
|
|
compass interactive
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="stats"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Print out statistics about your stylesheets
|
|
|
|
|
|
|
|
compass stats
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="version"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Emit the version of compass
|
|
|
|
|
|
|
|
compass version
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="unpack"/>
|
2010-08-29 18:33:55 +00:00
|
|
|
### Unpack a framework or extension into your project
|
|
|
|
|
|
|
|
compass unpack <extension>
|
|
|
|
|
2010-05-01 22:24:28 +00:00
|
|
|
Get Help on the Command Line
|
|
|
|
----------------------------
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="help"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Get help on compass
|
|
|
|
|
|
|
|
compass help
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="help-extension"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Get help on an extension
|
|
|
|
|
|
|
|
compass help extension_name
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="help-pattern"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Get help about an extension pattern
|
|
|
|
|
|
|
|
compass help extension_name/pattern_name
|
|
|
|
|
2010-11-01 07:44:45 +00:00
|
|
|
<a name="help-command"/>
|
2010-05-01 22:24:28 +00:00
|
|
|
### Get help about a particular sub command
|
|
|
|
|
|
|
|
compass help command_name
|
|
|
|
|