🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

node-sass-css-importer

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-sass-css-importer - npm Package Compare versions

Comparing version
0.0.2
to
0.0.3
+7
.travis.yml
language: node_js
node_js:
- "0.12"
- "0.11"
- "0.10"
- "iojs"
- "iojs-v1.0.4"
html {
font-size: 10px;
}
@import "CSS:doesntexist";
+6
-3

@@ -9,3 +9,3 @@ var fs = require('fs')

, import_paths_len;
return function(url, prev, done) {

@@ -34,9 +34,12 @@ if (url.slice(0, 4) !== 'CSS:') {

fs.readFile(css_filepath, function(err, data) {
if (err) return console.error(err);
if (err) {
return done(err);
}
done({contents: data.toString()});
});
break;
return;
}
}
return done(new Error('Specified CSS file not found! ("' + css_path + '" referenced from "' + prev + '")'));
};
};
{
"name": "node-sass-css-importer",
"version": "0.0.2",
"version": "0.0.3",
"description": "css importer for node-sass",

@@ -5,0 +5,0 @@ "main": "index.js",

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

# Node Sass CSS importer.
# Node Sass CSS importer [![Build Status](https://travis-ci.org/fetch/node-sass-css-importer.svg?branch=master)](https://travis-ci.org/fetch/node-sass-css-importer) [![npmjs](https://badge.fury.io/js/node-sass-css-importer.svg)](https://www.npmjs.com/package/node-sass-css-importer)

@@ -3,0 +3,0 @@ The Node Sass CSS Importer allows you to import a CSS file into Sass. Just like the [Sass CSS importer](https://github.com/chriseppstein/sass-css-importer).

@@ -29,1 +29,17 @@ var fs = require('fs')

});
node.render({
file: path.join(__dirname, 'badsource.scss'),
importer: cssImporter({import_paths: [__dirname]})
}, function(err, actual) {
assert.notEqual(err, null);
assert.equal(err.message.slice(0, 29), 'Specified CSS file not found!');
});
node.render({
data: 'html{font-size: 10px}@import "CSS:doesntexist";',
importer: cssImporter({import_paths: [__dirname]})
}, function(err, actual) {
assert.notEqual(err, null);
assert.equal(err.message.slice(0, 29), 'Specified CSS file not found!');
});