Socket
Socket
Sign inDemoInstall

node-sass

Package Overview
Dependencies
Maintainers
2
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 0.2.4 to 0.2.5

libsass/constants.cpp

2

package.json

@@ -5,3 +5,3 @@ {

"description": "wrapper around libsass",
"version": "0.2.4",
"version": "0.2.5",
"homepage": "http://github.com/andrew/node-sass",

@@ -8,0 +8,0 @@ "main": "./sass.js",

@@ -16,5 +16,17 @@ ##node-sass

var sass = require('node-sass');
sass.render(scss_content, callback [, options]);
Especially, the options argument is optional. It support two attribute: `include_paths` and `output_style`, both of them are optional.
`include_paths` is an `Array`, you can add a sass import path.
`output_style` is a `String`, its value should be one of `'nested', 'expanded', 'compact', 'compressed'`.
[Important: currently the argument `output_style` has some problem which may cause the output css becomes nothing because of the libsass, so you should not use it now!]
Here is an example:
var sass = require('node-sass');
sass.render('body{background:blue; a{color:black;}}', function(err, css){
console.log(css)
});
}/*, { include_paths: [ 'lib/', 'mod/' ], output_style: 'compressed' }*/);

@@ -21,0 +33,0 @@ ## Connect/Express middleware

@@ -16,4 +16,20 @@ var binding;

}
exports.render = binding.render
var toString = Object.prototype.toString;
SASS_OUTPUT_STYLE = {
nested: 0,
expanded: 1,
compact: 2,
compressed: 3
};
exports.render = function(css, callback, options) {
var paths, style;
if (toString.call(options) !== '[object Object]') {
options = {};
}
paths = options.include_paths || [];
if (!((style = options.output_style) in SASS_OUTPUT_STYLE)) {
style = 'nested';
}
return binding.render(css, callback, paths.join(':'), SASS_OUTPUT_STYLE[style]);
};
exports.middleware = require('./lib/middleware');

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