Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
5
Help us understand the problem. What is going on with this article?
@sucelie

Gruntでcompassを複数ディレクトリでそれぞれコンパイル

More than 5 years have passed since last update.

メモ書き。

example.com/css
example.com/scss
example.com/下層/css
example.com/下層/scss

があるとする。同一案件なので一括でコンパイルさせたいんだよー。

example.com/Gruntfile.js
example.com/config.rb
example.com/下層/config.rb
を用意。

上層下層の文字は適当に入れ替えてください。

Gruntfile.js

module.exports = function(grunt) {
    grunt.initConfig({
        compass: {
            上層: {
                options: {
                    config: 'config.rb'
                }
            },
            下層: {
                options: {
                    config: '下層/config.rb'
                }
            }
        }
    });
//~~~~
};

compass

上層config.rb

http_path = "/"
css_dir = "css"
sass_dir = "scss"
images_dir = "images"
javascripts_dir = "js"

output_style = :compact

line_comments = false
下層config.rb

http_path = "/"
css_dir = "下層/css"
sass_dir = "下層/scss"
images_dir = "下層/images"
javascripts_dir = "下層/js"

output_style = :compact

line_comments = false

あんまり考えずに作ったので、超適当。
config.rbも下層のconfig.rbから上層のを上手くインポートさせれば一元管理できるかもね。

5
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
sucelie

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
5
Help us understand the problem. What is going on with this article?