node-sass
Advanced tools
Comparing version 0.6.4 to 0.6.5
@@ -5,3 +5,3 @@ { | ||
"description": "wrapper around libsass", | ||
"version": "0.6.4", | ||
"version": "0.6.5", | ||
"homepage": "https://github.com/andrew/node-sass", | ||
@@ -41,3 +41,4 @@ "keywords": [ | ||
"colors": "0.6.0-1", | ||
"optimist": "0.4.x" | ||
"optimist": "0.6.x", | ||
"node-watch": "0.3.x" | ||
}, | ||
@@ -44,0 +45,0 @@ "devDependencies": { |
@@ -102,2 +102,6 @@ ##node-sass | ||
## DocPad Plugin | ||
[@jking90](https://github.com/jking90) wrote a [DocPad](http://docpad.org/) plugin that compiles `.scss` files using node-sass: <https://github.com/jking90/docpad-plugin-nodesass> | ||
## Grunt extension | ||
@@ -104,0 +108,0 @@ |
@@ -91,1 +91,2 @@ var binding; | ||
exports.middleware = require('./lib/middleware'); | ||
exports.cli = require('./lib/cli'); |
@@ -6,2 +6,3 @@ var path = require('path'), | ||
sass = require(path.join(__dirname, '..', 'sass')), | ||
cli = require(path.join(__dirname, '..', 'lib', 'cli')), | ||
@@ -11,3 +12,19 @@ cliPath = path.resolve(__dirname, '..', 'bin', 'node-sass'), | ||
var expectedSampleCompressed = '#navbar {width:80%;height:23px;}\ | ||
#navbar ul {list-style-type:none;}\ | ||
#navbar li {float:left;}\ | ||
#navbar li a {font-weight:bold;}'; | ||
var expectedSampleNoComments = '#navbar {\n\ | ||
width: 80%;\n\ | ||
height: 23px; }\n\ | ||
\n\ | ||
#navbar ul {\n\ | ||
list-style-type: none; }\n\ | ||
\n\ | ||
#navbar li {\n\ | ||
float: left; }\n\ | ||
#navbar li a {\n\ | ||
font-weight: bold; }\n'; | ||
describe('cli', function() { | ||
@@ -28,5 +45,4 @@ it('should print help when run with no arguments', function(done) { | ||
fs.exists(resultPath, function(exists) { | ||
done(assert(exists)); | ||
fs.unlink(resultPath, function() {}); | ||
assert(exists); | ||
fs.unlink(resultPath, done); | ||
}); | ||
@@ -44,8 +60,47 @@ }); | ||
fs.exists(resultPath, function(exists) { | ||
done(assert(exists)); | ||
assert(exists); | ||
fs.unlink(resultPath, done); | ||
}); | ||
}); | ||
}); | ||
fs.unlink(resultPath, function() {}); | ||
it('should compile with --include-paths option', function(done){ | ||
var emitter = cli(['--include-paths', __dirname + '/lib', __dirname + '/include_path.scss']); | ||
emitter.on('error', done); | ||
emitter.on('render', function(css){ | ||
assert.equal(css.trim(), 'body {\n background: red; }'); | ||
fs.unlink(process.cwd() + '/include_path.css', done); | ||
}); | ||
}); | ||
it('should compile with the --output-style', function(done){ | ||
var emitter = cli(['--output-style', 'compressed', __dirname + '/sample.scss']); | ||
emitter.on('error', done); | ||
emitter.on('render', function(css){ | ||
assert.equal(css, expectedSampleCompressed); | ||
fs.unlink(process.cwd() + '/sample.css', done); | ||
}); | ||
}); | ||
it('should compile with the --source-comments option', function(done){ | ||
var emitter = cli(['--source-comments', 'none', __dirname + '/sample.scss']); | ||
emitter.on('error', done); | ||
emitter.on('render', function(css){ | ||
assert.equal(css, expectedSampleNoComments); | ||
fs.unlink(process.cwd() + '/sample.css', done); | ||
}); | ||
}); | ||
it('should write the output to the file specified with the --output option', function(done){ | ||
var resultPath = path.resolve(__dirname, '..', 'output.css'); | ||
var emitter = cli(['--output', resultPath, __dirname + '/sample.scss']); | ||
emitter.on('error', done); | ||
emitter.on('write', function(css){ | ||
fs.exists(resultPath, function(exists) { | ||
assert(exists); | ||
fs.unlink(resultPath, done); | ||
}); | ||
}); | ||
}); | ||
}); |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
23388662
843
20181
167
4
8
+ Addednode-watch@0.3.x
+ Addedminimist@0.0.10(transitive)
+ Addednode-watch@0.3.5(transitive)
+ Addedoptimist@0.6.1(transitive)
- Removedoptimist@0.4.0(transitive)
Updatedoptimist@0.6.x