- Build status
- Install
- [Install with npm](#install-with-npmnpmjsorg)
- Tasks
- Configuration
- options.rubyExecutable
- options.bundleExecutable
- options.bundleExec
- options.compassExecutable
- options.args
- options.args.require
- options.args.sourceMap
- options.args.debugInfo
- options.args.load
- options.args.loadAll
- options.args.importPath
- options.args.quiet
- options.args.trace
- options.args.boring
- options.args.config
- options.args.app
- options.args.appDir
- options.args.sassDir
- options.args.cssDir
- options.args.imagesDir
- options.args.javascriptDir
- options.args.fontsDir
- options.args.environment
- options.args.outputStyle
- options.args.relativeAssets
- options.args.noLineComments
- options.args.httpPath
- options.args.generatedImagesPath
- files
- Flags
- Examples
- Author
- Release History
- License
Install with npm
npm install grunt-compass-wrapper --save-dev
Every options is the same for for each tasks.
Wrapper around the $ compass clean
command.
Remove generated files and the sass cache.
Configuration
- options
- files
With the default options the
grunt compass-clean
is equivalent to
bundle exec compass clean
Wrapper around the $ compass compile
command.
Compile Sass stylesheets to CSS.
Configuration
- options
- files
With the default options the
grunt compass-compile
is equivalent to
bundle exec compass compile
Wrapper around the $ compass validate
command.
Validate your generated css.
Supported arguments
- options
- files
With the default options the
grunt compass-validate
is equivalent to
bundle exec compass validate
Type: String
Default value: ''
Type: String
Default value: 'bundle'
Type: Boolean
Default value: true
Type: String
Default value: 'compass'
Type: Object
Default value: {}
All argument is same as the CLI counterpart.
You can check them with the $ compass {clean|compile|validate} --help
command.
Type: Object
Default value: {}
Key-value pairs where the key is the desired library and the value is false
or
true
.
grunt.initConfig({
'compass-compile': {
options: {
args: {
require: {
'path/to/gem-01': true,
'path/to/gem-02': true,
'path/to/gem-03': true
}
}
},
'my-target-01': {
options: {
args: {
require: {
'path/to/gem-02': false
}
}
}
}
}
});
compass-compile --require 'path/to/gem-01' --require 'path/to/gem-03'
Type: Boolean
Default value: null
Type: Boolean
Default value: null
Type: String
Default value: ''
Type: String
Default value: ''
Type: String
Default value: ''
Type: Boolean
Default value: false
Type: Boolean
Default value: false
Type: Boolean
Default value: false
Type: String
Default value: ''
Type: String
Default value: ''
Type: String
Default value: ''
Type: String
Default value: ''
Type: String
Default value: ''
Type: String
Default value: ''
Type: String
Default value: ''
Type: String
Default value: ''
Type: String
Default value: ''
Type: String
Default value: ''
Type: Boolean
Default value: false
Type: Boolean
Default value: false
Type: String
Default value: ''
Type: String
Default value: ''
For more information see the Grunt documentation Configuring tasks/files
grunt compass-compile:my-01
echo 'is equivalent to'
/home/foo/.rvm/rubies/ruby-2.1.3/bin/ruby /home/foo/.rvm/gems/ruby-2.1.3/bin/bundle exec compass compile --boring
grunt compass-compile:my-02
echo 'is equivalent to'
bundle exec compass compile --environment production
You can modify the arguments by Flags
Override the value of options.args.quiet argument with true
.
Override the value of options.args.trace argument with true
.
Override the value of options.args.force argument with true
.
Override the value of options.args.boring argument with true
.
Override the value of options.args.environment argument with 'development'
.
Override the value of options.args.environment argument with 'production'
.
Override the value of options.args.outputStyle argument with 'nested'
.
Override the value of options.args.outputStyle argument with 'expanded'
.
Override the value of options.args.outputStyle argument with 'compact'
.
Override the value of options.args.outputStyle argument with 'compressed'
.
Override the value of options.args.relativeAssets argument with true
.
Override the value of options.args.noLineComments argument with true
.
require('jit-grunt')(
grunt,
// Mapping.
{
'compass-clean': 'grunt-compass-wrapper',
'compass-compile': 'grunt-compass-wrapper',
'compass-validate': 'grunt-compass-wrapper'
}
);
grunt.initConfig({
'compass-clean': {
'my-01': {
files: {
src: ['./path/to/dir/config.rb']
}
}
},
'compass-compile': {
'my-01': {
files: {
src: ['./path/to/dir/config.rb']
}
}
},
'compass-validate': {
'my-01': {
files: {
src: ['./path/to/dir/config.rb']
}
}
}
});
grunt.registerTask('scss-compile', [
'compass-clean',
'compass-compile',
'compass-validate'
]);
grunt scss-compile
echo 'is equivalent to'
bundle exec compass clean
bundle exec compass compile
bundle exec compass validate
grunt.initConfig({
'compass-compile': {
options: {
rubyExecutable: '/home/foo/.rvm/rubies/ruby-2.1.3/bin/ruby',
bundleExecutable: '/home/foo/.rvm/gems/ruby-2.1.3/bin/bundle',
args: {
boring: true
}
},
'my-01': {
files: {
src: ['**/config.rb']
}
},
'my-02': {
options: {
rubyExecutable: '',
bundleExecutable: '',
args: {
boring: false,
environment: 'production'
}
},
files: {
src: ['**/config.rb']
}
}
}
});
grunt.initConfig({
'compass-compile': {
options: {
bundleExec: false
},
'my-01': {
files: {
src: ['./path/to/dir/config.rb']
}
}
}
});
grunt compass-compile
echo 'is equivalent to'
compass compile
grunt.initConfig({
'compass-compile': {
options: {
args: {
environment: 'development',
outputStyle: 'nested'
}
},
'my-01': {
files: {
src: ['./path/to/dir/config.rb']
}
}
}
});
grunt compass-compile
echo 'is equivalent to'
bundle exec compass compile --environment 'development' --output-style 'nested'
grunt.initConfig({
'compass-compile': {
options: {
args: {
environment: 'development',
outputStyle: 'nested'
}
},
'my-01': {
files: {
src: ['./path/to/dir/config.rb']
}
}
}
});
grunt.registerTask('scss-compile-prod', [
'compass-compile:my-01:production:compressed'
]);
grunt compass-compile:my-01
echo 'is equivalent to'
bundle exec compass compile --environment 'development' --output-style 'nested'
grunt compass-compile:my-01:production:compressed
echo 'is equivalent to'
grunt scss-compile-prod
echo 'is equivalent to'
bundle exec compass compile --environment 'production' --output-style 'compressed'
Andor Dávid
- v0.0.5 - 2015-05-24
- Rename a "options.arguments" to "options.args".
- v0.0.4 - 2015-05-24
- Improved documentation
- v0.0.3 - 2015-05-22
- Nobody knows
- v0.0.2 - 2015-05-18
- Flag support
Copyright (c) 2015 Andor Dávid, contributors.
This file was generated by grunt-verb on May 27, 2015.