Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Support for an expanded compass --require arg #483

Merged
merged 1 commit into from

3 participants

@jeffinmotion

As it stands, the Gruntfile compass configuration will only let me require 1 compass plugin via the --require arg.

This change to the optsToArgs function would allow arrays in the config and properly expand them for the spawn util.

So for example:

    ...
    compass: {
      dist: {
        require: ['modular-scale', 'susy'],
    ...

would get properly expanded to:
--require modular-scale --require susy

@sindresorhus sindresorhus merged commit 17e332e into yeoman:master
@sindresorhus

@jeffinmotion Awesome, didn't think of that. Thanks :)

@jeffinmotion

No problem!

@imranansari

is below the right config for compass plugins?, using suzy as an example.

 compass: {
      dist: {
        // http://compass-style.org/help/tutorials/configuration-reference/#configuration-properties
        require: ['susy'],
        options: {
          css_dir: 'temp/styles',
          sass_dir: 'app/styles',
          images_dir: 'app/images',
          javascripts_dir: 'temp/scripts',
          force: true
        }
      }
    }

doesn't seem to pickup susy mixins in my SCSS files.

@jeffinmotion

@imranansari —close! --require is a compass param, so it needs to go in your compass options.

compass: {
  dist: {
    // http://compass-style.org/help/tutorials/configuration-reference/#configuration-properties
    options: {
      css_dir: 'temp/styles',
      sass_dir: 'app/styles',
      images_dir: 'app/images',
      javascripts_dir: 'temp/scripts',
      require: ['susy'],
      force: true
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 17, 2012
  1. @jeffinmotion
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0 cli/tasks/compass.js
View
6 cli/tasks/compass.js
@@ -18,6 +18,12 @@ module.exports = function( grunt ) {
if ( _.isString( val ) ) {
args.push( '--' + el, val );
}
+
+ if( _.isArray( val ) ) {
+ val.forEach(function( subval ) {
+ args.push( '--' + el, subval );
+ });
+ }
});
return args;
Something went wrong with that request. Please try again.