Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-contrib-sass

Package Overview
Dependencies
Maintainers
4
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-contrib-sass - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

README.md

39

docs/sass-options.md
# 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc