Small helper to ease the use of grunt with symfony2
This is a small helper to ease the usage of Grunt with Symfony2.
It may be, that you can configure the paths in grunt in a way, which makes this plugin obsolete - but I haven't found a way yet.
Especially multiple wildcards in a path
* seem to be an issue, like here:
This helper returns the prepared grunt configuration for the sass and the uglify tasks:
var gruntSymfony2Assets = ;var gruntConfig = ;
You can pass your own config (used in the
options field in the definition for the tasks) for these two tasks:
var gruntSymfony2Assets = ;var myOwnConfig =sass:// special config goes hereuglify:// special config goes here;var gruntConfig = ;
Example: you want to enable sourcemaps in SASS.
var gruntSymfony2Assets = ;var myOwnConfig =sass:sourcemap: true;var gruntConfig = ;
Please not that all config values, which you don't pass explicitly, will be filled with the default values.
This module defines some default options for both sass and uglify:
// SASSstyle: "compressed"sourcemap: falselineNumbers: falseprecision: 5quiet: true // bourbon throws a lot of deprecations with SASS 3.3// Uglifycompress: truebeautify: falsereport: "gzip"
var gruntSymfony2Assets = ;var gruntConfig = ;// here goes your own configgruntConfiguglifymy_stuff = /* ... */ ;gruntConfigcopy = /* ... */ ;// ...grunt;