Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Support for the 'require' parameter

  • Loading branch information...
commit 3cb2e23a6b7d0a1b3d4c5e0a81230c60006c2f13 1 parent 4c16e43
@FGRibreau authored
Showing with 20 additions and 4 deletions.
  1. +13 −2 README.md
  2. +7 −2 tasks/compass.js
View
15 README.md
@@ -59,7 +59,18 @@ This is a custom grunt.js multitask that executes `compass compile` for you and
}
}
```
-8. Run "grunt watch" and change some SASS files :)
+
+8. You can require a given ruby library before running commands
+
+ ```javascript
+ compass: {
+ somename: {
+ require: 'animate-sass mylib'
+ }
+ }
+ ```
+
+9. Run "grunt watch" and change some SASS files :)
# Real World Examples
* [krzysu](https://github.com/krzysu) posted a Gist with his `compass compile` configuration [over here](https://gist.github.com/2917330).
@@ -94,4 +105,4 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
+OTHER DEALINGS IN THE SOFTWARE.
View
9 tasks/compass.js
@@ -11,7 +11,8 @@ module.exports = function( grunt ) {
dest = this.data.dest,
outputstyle = this.data.outputstyle,
linecomments = this.data.linecomments,
- forcecompile = this.data.forcecompile;
+ forcecompile = this.data.forcecompile,
+ libRequire = this.data.require;
if ( src !== undefined && dest !== undefined ) {
command += ' --sass-dir="' + src + '" --css-dir="' + dest + '"';
@@ -25,6 +26,10 @@ module.exports = function( grunt ) {
command += ' --no-line-comments';
}
+ if(libRequire !== undefined){
+ command += ' --require '+ libRequire;
+ }
+
if ( forcecompile === true ) {
command += ' --force';
}
@@ -50,4 +55,4 @@ module.exports = function( grunt ) {
exec( command, puts );
grunt.log.write( '`' + command + '` was initiated.' );
});
-};
+};
Please sign in to comment.
Something went wrong with that request. Please try again.