LoginSignup
8
5

More than 5 years have passed since last update.

Compassを使ってSassを自動コンパイル

Posted at

Compass_Home___Compass_Documentation_1D685425.png
Compass公式サイト http://compass-style.org/

GemでCompassをインストールします。

$ gem update --system
$ gem install compass

適当なパスに移動して、Compassを使う準備をします。

$ cd example/compass #適当なパス
$ compass init

生成されたファイルの構成は次のようになっています。

/
|-- config.rb #設定ファイル
|-- sass
|   |-- ie.scss
|   |-- print.scss
|   `-- screen.scss
`-- stylesheets
    |-- ie.css
    |-- print.css
    |-- screen.css

自動コンパイルするには次のコマンド

$ compass watch

これでsassディレクトリで保存したSassファイルが自動でコンパイルされるようになります。

8
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
5