grunt-contrib-sass
Advanced tools
Comparing version 0.2.1 to 0.2.2
# Options | ||
## trace ```boolean``` | ||
## trace | ||
Type: `Boolean` | ||
Show a full traceback on error. | ||
## unixNewlines ```boolean``` | ||
## unixNewlines | ||
Type: `Boolean` | ||
Force Unix newlines in written files. | ||
## check ```boolean``` | ||
## check | ||
Type: `Boolean` | ||
Just check syntax, don't evaluate. | ||
## style ```string``` | ||
## style | ||
Type: `String` | ||
Output style. Can be `nested` (default), `compact`, `compressed`, or `expanded`. | ||
## precision ```number``` | ||
## precision | ||
Type: `Number` | ||
How many digits of precision to use when outputting decimal numbers. Defaults to 3. | ||
## quiet ```boolean``` | ||
## quiet | ||
Type: `Boolean` | ||
Silence warnings and status messages during compilation. | ||
## compass ```boolean``` | ||
## compass | ||
Type: `Boolean` | ||
Make Compass imports available and load project configuration. | ||
## debugInfo ```boolean``` | ||
## debugInfo | ||
Type: `Boolean` | ||
Emit extra information in the generated CSS that can be used by the FireSass Firebug plugin. | ||
## lineNumbers ```boolean``` | ||
## lineNumbers | ||
Type: `Boolean` | ||
Emit comments in the generated CSS indicating the corresponding source line. | ||
## loadPath ```string|array``` | ||
## loadPath | ||
Type: `String|Array` | ||
Add a (or multiple) Sass import path. | ||
## require ```string|array``` | ||
## require | ||
Type: `String|Array` | ||
Require a (or multiple) Ruby library before running Sass. | ||
## cacheLocation ```string``` | ||
## cacheLocation | ||
Type: `String` | ||
The path to put cached Sass files. Defaults to `.sass-cache`. | ||
## noCache ```boolean``` | ||
## noCache | ||
Type: `Boolean` | ||
Don't cache to sassc files. |
@@ -1,1 +0,1 @@ | ||
This task requires you to have [Ruby](http://www.ruby-lang.org/en/downloads/) and [Sass](http://sass-lang.com/download.html). If you're on OS X or Linux you probably already have Ruby installed, try `ruby -v` in your terminal. When you've confirmed you have Ruby installed, run `gem install sass` to install Sass. | ||
This task requires you to have [Ruby](http://www.ruby-lang.org/en/downloads/) and [Sass](http://sass-lang.com/download.html). If you're on OS X or Linux you probably already have Ruby installed, try `ruby -v` in your terminal. When you've confirmed you have Ruby installed, run `gem install sass` to install Sass. |
@@ -45,3 +45,3 @@ /* | ||
nodeunit: { | ||
tasks: ['test/*_test.js'] | ||
tests: ['test/*_test.js'] | ||
} | ||
@@ -59,5 +59,3 @@ }); | ||
grunt.registerTask('mkdir', function(dir) { | ||
require('fs').mkdirSync(dir); | ||
}); | ||
grunt.registerTask('mkdir', grunt.file.mkdir); | ||
@@ -75,3 +73,3 @@ // Whenever the "test" task is run, first clean the "tmp" dir, then run this | ||
// By default, lint and run all tests. | ||
grunt.registerTask('default', ['test', 'build-contrib']); | ||
grunt.registerTask('default', ['jshint', 'test', 'build-contrib']); | ||
}; |
{ | ||
"name": "grunt-contrib-sass", | ||
"description": "Compile Sass to CSS", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"homepage": "https://github.com/gruntjs/grunt-contrib-sass", | ||
@@ -23,20 +23,22 @@ "author": { | ||
], | ||
"main": "grunt.js", | ||
"main": "Gruntfile.js", | ||
"engines": { | ||
"node": ">=0.8.0" | ||
"node": ">= 0.8.0" | ||
}, | ||
"scripts": { | ||
"test": "./node_modules/.bin/grunt test" | ||
"test": "grunt test" | ||
}, | ||
"dependencies": { | ||
"grunt-lib-contrib": "~0.3.0" | ||
"grunt-lib-contrib": "~0.5.1" | ||
}, | ||
"devDependencies": { | ||
"grunt": "~0.4.0", | ||
"grunt-cli": "~0.1.1", | ||
"grunt-contrib-internal": "~0.1.0", | ||
"grunt-contrib-clean": "~0.4.0a", | ||
"grunt-contrib-jshint": "~0.1.0", | ||
"grunt-contrib-nodeunit": "~0.1.0" | ||
"grunt-contrib-clean": "~0.4.0", | ||
"grunt-contrib-jshint": "~0.1.1", | ||
"grunt-contrib-nodeunit": "~0.1.2", | ||
"grunt-contrib-internal": "~0.4.2", | ||
"grunt": "~0.4.0" | ||
}, | ||
"peerDependencies": { | ||
"grunt": "~0.4.0" | ||
}, | ||
"keywords": [ | ||
@@ -43,0 +45,0 @@ "gruntplugin", |
@@ -18,42 +18,51 @@ /* | ||
var cb = this.async(); | ||
var src = this.file.src; | ||
var dest = this.file.dest; | ||
var args = [dest, '--stdin'].concat(helpers.optsToArgs(options)); | ||
var max = src.map(function(filepath) { | ||
return grunt.file.read(filepath); | ||
}).join('\n'); | ||
grunt.verbose.writeflags(options, 'Options'); | ||
if (path.extname(src[0]) === '.scss') { | ||
args.push('--scss'); | ||
} | ||
grunt.util.async.forEachSeries(this.files, function(f, next) { | ||
var args = [f.dest, '--stdin'].concat(helpers.optsToArgs(options)); | ||
// Make sure grunt creates the destination folders | ||
grunt.file.write(dest, ''); | ||
// If were compiling scss files | ||
if (path.extname(f.src[0]) === '.scss') { | ||
args.push('--scss'); | ||
} | ||
// Add dirs of specified files to the sass path | ||
src.forEach(function(el) { | ||
args.push('--load-path', path.dirname(el)); | ||
}); | ||
var max = f.src.filter(function(filepath) { | ||
// Warn on and remove invalid source files (if nonull was set). | ||
if (!grunt.file.exists(filepath)) { | ||
grunt.log.warn('Source file "' + filepath + '" not found.'); | ||
return false; | ||
} else { | ||
return true; | ||
} | ||
}).map(function(filepath) { | ||
// Add dirs of specified files to the sass path | ||
args.push('--load-path', path.dirname(filepath)); | ||
var sass = grunt.util.spawn({ | ||
cmd: process.platform === 'win32' ? 'sass.bat' : 'sass', | ||
args: args | ||
}, function(error, result, code) { | ||
if (code === 127) { | ||
return grunt.warn( | ||
'You need to have Ruby and Sass installed and in your PATH for ' + | ||
'this task to work. More info: ' + | ||
'https://github.com/gruntjs/grunt-contrib-sass' | ||
); | ||
} | ||
cb(error); | ||
}); | ||
return grunt.file.read(filepath); | ||
}).join(grunt.util.normalizelf(grunt.util.linefeed)); | ||
sass.stdin.write(new Buffer(max)); | ||
sass.stdin.end(); | ||
sass.stdout.pipe(process.stdout); | ||
sass.stderr.pipe(process.stderr); | ||
// Make sure grunt creates the destination folders | ||
grunt.file.write(f.dest, ''); | ||
var sass = grunt.util.spawn({ | ||
cmd: process.platform === 'win32' ? 'sass.bat' : 'sass', | ||
args: args | ||
}, function(error, result, code) { | ||
if (code === 127) { | ||
return grunt.warn( | ||
'You need to have Ruby and Sass installed and in your PATH for\n' + | ||
'this task to work. More info:\n' + | ||
'https://github.com/gruntjs/grunt-contrib-sass' | ||
); | ||
} | ||
next(error); | ||
}); | ||
sass.stdin.write(new Buffer(max)); | ||
sass.stdin.end(); | ||
sass.stdout.pipe(process.stdout); | ||
sass.stderr.pipe(process.stderr); | ||
}, cb); | ||
}); | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
14911
5
12
118
0
197
0
2
1
+ Addedabbrev@1.1.1(transitive)
+ Addedargparse@0.1.16(transitive)
+ Addedasync@0.1.22(transitive)
+ Addedcoffee-script@1.3.3(transitive)
+ Addedcolors@0.6.2(transitive)
+ Addeddateformat@1.0.2-1.2.3(transitive)
+ Addedesprima@1.0.4(transitive)
+ Addedeventemitter2@0.4.14(transitive)
+ Addedexit@0.1.2(transitive)
+ Addedfindup-sync@0.1.3(transitive)
+ Addedgetobject@0.1.0(transitive)
+ Addedglob@3.1.213.2.11(transitive)
+ Addedgraceful-fs@1.2.3(transitive)
+ Addedgrunt@0.4.5(transitive)
+ Addedgrunt-legacy-log@0.1.3(transitive)
+ Addedgrunt-legacy-log-utils@0.1.1(transitive)
+ Addedgrunt-legacy-util@0.2.0(transitive)
+ Addedgrunt-lib-contrib@0.5.3(transitive)
+ Addedhooker@0.2.3(transitive)
+ Addediconv-lite@0.2.11(transitive)
+ Addedinherits@1.0.22.0.4(transitive)
+ Addedjs-yaml@2.0.5(transitive)
+ Addedlodash@0.9.22.4.2(transitive)
+ Addedlru-cache@2.7.3(transitive)
+ Addedminimatch@0.2.140.3.0(transitive)
+ Addednopt@1.0.10(transitive)
+ Addedrimraf@2.2.8(transitive)
+ Addedsigmund@1.0.1(transitive)
+ Addedunderscore@1.7.0(transitive)
+ Addedunderscore.string@2.2.12.3.32.4.0(transitive)
+ Addedwhich@1.0.9(transitive)
+ Addedzlib-browserify@0.0.1(transitive)
- Removedgrunt-lib-contrib@0.3.1(transitive)
Updatedgrunt-lib-contrib@~0.5.1