Socket
Socket
Sign inDemoInstall

node-sass

Package Overview
Dependencies
Maintainers
5
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-sass - npm Package Compare versions

Comparing version 3.0.0-beta.4 to 3.0.0-beta.5

src/libsass.gyp

56

lib/index.js

@@ -285,13 +285,29 @@ /*!

if (importer) {
options.importer = function(file, prev, bridge) {
function done(data) {
bridge.success(data);
}
if (Array.isArray(importer)) {
importer.forEach(function(subject, index) {
options.importer[index] = function(file, prev, bridge) {
function done(data) {
bridge.success(data);
}
var result = importer.call(options.context, file, prev, done);
var result = subject.call(options.context, file, prev, done);
if (result) {
done(result);
}
};
if (result) {
done(result === module.exports.NULL ? null : result);
}
};
});
} else {
options.importer = function(file, prev, bridge) {
function done(data) {
bridge.success(data);
}
var result = importer.call(options.context, file, prev, done);
if (result) {
done(result === module.exports.NULL ? null : result);
}
};
}
}

@@ -304,4 +320,4 @@

Object.keys(functions).forEach(function(signature) {
var cb = normalizeFunctionSignature(signature, functions[signature]);
Object.keys(functions).forEach(function(subject) {
var cb = normalizeFunctionSignature(subject, functions[subject]);

@@ -341,5 +357,17 @@ options.functions[cb.signature] = function() {

if (importer) {
options.importer = function(file, prev) {
return importer.call(options.context, file, prev);
};
if (Array.isArray(importer)) {
importer.forEach(function(subject, index) {
options.importer[index] = function(file, prev) {
var result = subject.call(options.context, file, prev);
return result === module.exports.NULL ? null : result;
};
});
} else {
options.importer = function(file, prev) {
var result = importer.call(options.context, file, prev);
return result === module.exports.NULL ? null : result;
};
}
}

@@ -346,0 +374,0 @@

@@ -31,3 +31,5 @@ /*!

sourceMap: options.sourceMap,
sourceMapRoot: options.sourceMapRoot,
importer: options.importer,
functions: options.functions,
indentWidth: options.indentWidth,

@@ -34,0 +36,0 @@ indentType: options.indentType,

{
"name": "node-sass",
"version": "3.0.0-beta.4",
"libsass": "3.2.0-beta.2",
"version": "3.0.0-beta.5",
"libsass": "3.2.0-beta.5",
"description": "Wrapper around libsass",

@@ -56,3 +56,3 @@ "license": "MIT",

"pangyp": "^2.1.0",
"request": "^2.53.0",
"request": "^2.55.0",
"sass-graph": "^1.2.0"

@@ -62,3 +62,3 @@ },

"coveralls": "^2.11.2",
"cross-spawn": "^0.2.6",
"cross-spawn": "^0.2.8",
"jscoverage": "^0.5.9",

@@ -65,0 +65,0 @@ "jshint": "^2.6.3",

@@ -60,3 +60,3 @@ # node-sass

### file
Type: `String | null`
Type: `String`
Default: `null`

@@ -68,3 +68,3 @@ **Special**: `file` or `data` must be specified

### data
Type: `String | null`
Type: `String`
Default: `null`

@@ -76,3 +76,3 @@ **Special**: `file` or `data` must be specified

### importer (>= v2.0.0)
Type: `Function` signature `function(url, prev, done)`
Type: `Function | Function[]` signature `function(url, prev, done)`
Default: `undefined`

@@ -95,2 +95,4 @@

Starting from v3.0.0, importer can be an array of functions, which will be called by libsass in the order of their occurance in array. This helps user specify special importer for particular kind of path (filesystem, http). If an importer does not want to handle a particular path, it should return `sass.NULL`. See [functions section](#functions--v300) for more details on Sass types.
### functions (>= v3.0.0)

@@ -229,14 +231,20 @@ `functions` is an `Object` that holds a collection of custom functions that may be invoked by the sass files being compiled. They may take zero or more input parameters and must return a value either synchronously (`return ...;`) or asynchronously (`done();`). Those parameters will be instances of one of the constructors contained in the `require('node-sass').types` hash. The return value must be of one of these types as well. See the list of available types below:

### sourceMapEmbed
### sourceMapContents
Type: `Boolean`
Default: `false`
`true` embeds the source map as a data URI
`true` includes the `contents` in the source map information
### sourceMapContents
### sourceMapEmbed
Type: `Boolean`
Default: `false`
`true` includes the `contents` in the source map information
`true` embeds the source map as a data URI
### sourceMapRoot
Type: `String`
Default: `undefined`
the value will be emitted as `sourceRoot` in the source map information
## `render` Callback (>= v3.0.0)

@@ -449,7 +457,9 @@ node-sass supports standard node style asynchronous callbacks with the signature of `function(err, result)`. In error conditions, the `error` argument is populated with the error object. In success conditions, the `result` object is populated with an object describing the result of the render call.

--source-map Emit source map
--source-map-contents Embed include contents in map
--source-map-embed Embed sourceMappingUrl as data URI
--source-map-contents Embed include contents in map
--source-map-root Base path, will be emitted in source-map as is
--include-path Path to look for imported files
--precision The amount of precision allowed in decimal numbers
--importer Path to custom importer
--importer Path to .js file containing custom importer
--functions Path to .js file containing custom functions
--help Print usage info

@@ -456,0 +466,0 @@ ```

@@ -56,3 +56,6 @@ /*!

function build(options) {
var args = [path.join('node_modules', 'pangyp', 'bin', 'node-gyp'), 'rebuild'].concat(options.args);
var args = [path.join('node_modules', 'pangyp', 'bin', 'node-gyp'), 'rebuild'].concat(
['libsass_ext', 'libsass_cflags', 'libsass_ldflags', 'libsass_library'].map(function(subject) {
return ['--', subject, '=', process.env[subject.toUpperCase()] || ''].join('');
})).concat(options.args);

@@ -59,0 +62,0 @@ console.log(['Building:', process.sass.runtime.execPath].concat(args).join(' '));

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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