1

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 .

Community
  • 1
  • 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 Jun 09 '14 at 18:12
  • 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 Jun 09 '14 at 18:37

1 Answers1

1

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.

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
  • Yes i am aware of that dont know if there is a loophole here . I think this idea is doomed ill try to further work on it and repost my findings :) . I hope i find something because this can be an awsome way to work with multiple projects in one folder . – Dragutescu Alexandru Jun 09 '14 at 18:40