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

sass-loader

Package Overview
Dependencies
Maintainers
3
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sass-loader - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

test/.npmignore

24

index.js

@@ -1,2 +0,1 @@

var util = require('util');
var utils = require('loader-utils');

@@ -7,3 +6,2 @@ var sass = require('node-sass');

module.exports = function (content) {

@@ -17,3 +15,3 @@ this.cacheable();

// skip empty files, otherwise it will stop webpack, see issue #21
if(opt.data.trim() == '') {
if (opt.data.trim() === '') {
return callback(null, content);

@@ -33,10 +31,17 @@ }

opt.stats = {};
var loadPaths = opt.includePaths;
var markDependencies = function () {
try {
var graph = sassGraph.parseFile(this.resourcePath, {loadPaths: loadPaths});
graph.visitDescendents(this.resourcePath, function (imp) {
this.addDependency(imp);
}.bind(this));
} catch (err) {
this.emitError(err);
}
}.bind(this);
// mark dependencies
var graph = sassGraph.parseFile(this.resourcePath, {loadPaths: opt.includePaths});
graph.visitDescendents(this.resourcePath, function (imp) {
this.addDependency(imp);
}.bind(this));
opt.success = function (css) {
markDependencies();
callback(null, css);

@@ -46,2 +51,3 @@ }.bind(this);

opt.error = function (err) {
markDependencies();
this.emitError(err);

@@ -48,0 +54,0 @@ callback(err);

{
"name": "sass-loader",
"version": "0.3.0",
"version": "0.3.1",
"description": "SASS loader for Webpack",
"main": "index.js",
"scripts": {
"test": "rm test/output/* && node ./node_modules/webpack/bin/webpack.js -d -w --config=test/webpack.config.js"
"pretest": "node test/prepare.js",
"test": "mocha -R spec"
},

@@ -21,10 +22,12 @@ "keywords": [

"dependencies": {
"loader-utils": "~0.2.2",
"node-sass": "^1.0.1",
"sass-graph": "^0.1.2"
"loader-utils": "^0.2.5",
"node-sass": "^1.2.2",
"sass-graph": "git+https://github.com/lox/sass-graph.git#3a17328"
},
"devDependencies": {
"css-loader": "^0.9.0",
"mocha": "^2.0.1",
"raw-loader": "^0.5.1",
"should": "^4.3.0",
"webpack": "^1.4.0"
}
}

@@ -31,4 +31,8 @@ # sass loader for [webpack](http://webpack.github.io/)

test: /\.scss$/,
loader: "style!css!sass?outputStyle=expanded&includePaths[]=" +
(path.resolve(__dirname, './bower_components/bootstrap-sass-official'))
// Query parameters are passed to node-sass
loader: "style!css!sass?outputStyle=expanded&" +
"includePaths[]=" +
(path.resolve(__dirname, "./bower_components")) + "&" +
"includePaths[]=" +
(path.resolve(__dirname, "./node_modules"))
}

@@ -35,0 +39,0 @@ ]

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