1
votes

This is my Gruntfile.js(part of it) that has the code for compass directories as you can see bellow :

 compass: {
      dist: {
        options: {
        sassDir: '*/docs/scss/*.scss',
         cssDir: '*/css/*.css',
         outputStyle: 'compressed'
        }
      }
    },

I'm using grunt-newer to compile only recently edited elements in project folders.

Bluntly put i have two projects folders in my main development folder, and when i run grunt watch or grunt compass i want to compile the sass that has the newest changes in it so i can work on multiple project in the same time . I ve tried some stuff but i only get this :

You must compile individual stylesheets from the project directory .

Is there a way to work around this ?

I want to work with app1 (folder) app2 app3 and app4 and when i run grunt compass the compiler to check all files and to modify only the ones that have changes in them .

1
Regarding the use of * at the beginning of both directory configuration items: Is it your intention that for each matched sassDir a corresponding (similar base path) cssDir will be used? - Jason Aller
As i think about this , it's kind of complicated , multiple projects idea might not work as well as i thought . I will delightfully wait for other answers , in the mean time i ll try to find a solution based on Jason Aller's answer , tnx by the way . - Dragutescu Alexandru

1 Answers

1
votes

In the configuration you provided both sassDir and cssDir were not specified as directory strings as they also included file extensions.

sassDir expects as string that points to the source directory where you keep your Sass stylesheets.

cssDir expects a string that points to the target directory where you keep your CSS stylesheets.

Thus a first step would be to revisit the entire set of instructions for how to specify the configuration.