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

grunt-contrib-sass

Package Overview
Dependencies
Maintainers
3
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.0 to 0.2.1

7

package.json
{
"name": "grunt-contrib-sass",
"description": "Compile Sass to CSS",
"version": "0.2.0",
"version": "0.2.1",
"homepage": "https://github.com/gruntjs/grunt-contrib-sass",

@@ -28,3 +28,3 @@ "author": {

"scripts": {
"test": "grunt test"
"test": "./node_modules/.bin/grunt test"
},

@@ -35,3 +35,4 @@ "dependencies": {

"devDependencies": {
"grunt": "~0.4.0a",
"grunt": "~0.4.0",
"grunt-cli": "~0.1.1",
"grunt-contrib-internal": "~0.1.0",

@@ -38,0 +39,0 @@ "grunt-contrib-clean": "~0.4.0a",

@@ -13,3 +13,2 @@ /*

var path = require('path');
var async = grunt.util.async;

@@ -20,48 +19,42 @@ grunt.registerMultiTask('sass', 'Compile Sass to CSS', function() {

var cb = this.async();
var args = ['--stdin'].concat(helpers.optsToArgs(options));
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');
async.forEachSeries(this.files, function(el, cb2) {
var elArgs = [el.dest];
var src = el.src;
var files = grunt.file.expandFiles(src);
var max = files.map(function(filepath) {
return grunt.file.read(filepath);
}).join('\n');
if (path.extname(src[0]) === '.scss') {
args.push('--scss');
}
if (path.extname(src) === '.scss') {
elArgs.push('--scss');
}
// Make sure grunt creates the destination folders
grunt.file.write(dest, '');
// Make sure grunt creates the destination folders
grunt.file.write(el.dest, '');
// Add dirs of specified files to the sass path
src.forEach(function(el) {
args.push('--load-path', path.dirname(el));
});
// Add dirs of specified files to the sass path
files.forEach(function(el) {
elArgs.push('--load-path', path.dirname(el));
});
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);
});
var sass = grunt.util.spawn({
cmd: process.platform === 'win32' ? 'sass.bat' : 'sass',
args: elArgs.concat(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'
);
}
cb2(code > 0);
});
sass.stdin.write(new Buffer(max));
sass.stdin.end();
sass.stdout.pipe(process.stdout);
sass.stderr.pipe(process.stderr);
}, function(error) {
cb(!error);
});
sass.stdin.write(new Buffer(max));
sass.stdin.end();
sass.stdout.pipe(process.stdout);
sass.stderr.pipe(process.stderr);
});
};

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