Compass Source in Multiple Directories

前端 未结 2 1057
再見小時候
再見小時候 2020-12-21 15:53

Have you had success compiling SASS in multiple directories? Can you set up compass to recursively watch a directory?

I have read the documentation on add_import_pa

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-21 16:21

    Let's say you have the following directroy structure:

    project
        |-- config.rb
        +-- apps
            |-- main.scss
            |-- app1
                +-- appst1.scss
            |-- app2
                +-- appst2.scss
            +-- app3
                +-- appst3.scss
    

    Then adjust your config.rb:

    sass_dir = "apps"
    add_import_path "apps"
    ...
    

    and in your main.scss include the other scss files:

    @import "app1/appst1";
    @import "app2/appst2";
    @import "app3/appst3";
    

提交回复
热议问题