New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

systemjs-plugin-css

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

systemjs-plugin-css - npm Package Compare versions

Comparing version

to
0.1.28

test/phantom.js

9

css-plugin-base-builder.js

@@ -67,2 +67,3 @@ var CleanCSS = require('./clean-css.js');

});
cssLoads = [];

@@ -73,3 +74,4 @@ return new Promise(function(resolve, reject) {

target: outFile,
root: loader.rootURL && path.resolve(loader.rootURL)
root: loader.rootURL && path.resolve(loader.rootURL),
relativeTo: fromFileURL(loader.baseURL)
}).minify(inputFiles, function(err, minified) {

@@ -98,4 +100,5 @@ if (err)

else {
// NB do data-encoding of css source map for non separateCSS case?
// cssOutput += '/*# sourceMappingURL=data,''
if (outputOpts.sourceMaps) {
cssOutput += '/*# sourceMappingURL=data:application/json;base64,' + new Buffer(result.map.toString()).toString('base64') + '*/';
}
return cssInject + '\n("' + escape(cssOutput) + '");';

@@ -102,0 +105,0 @@ }

@@ -9,6 +9,10 @@ /*

this.translate = function(load, opts) {
var loader = this;
if (loader.builder && loader.buildCSS === false) {
load.metadata.build = false;
return;
}
var path = this._nodeRequire && this._nodeRequire('path');
var loader = this;
return Promise.resolve(compileCSS.call(loader, load.source, load.address, load.metadata.loaderOptions || {}))

@@ -67,2 +71,2 @@ .then(function(result) {

module.exports = CSSPluginBase;
module.exports = CSSPluginBase;

@@ -112,3 +112,10 @@ if (typeof window !== 'undefined') {

exports.cssPlugin = true;
exports.fetch = function(load, fetch) {
if (!this.builder)
return '';
return fetch(load);
};
exports.translate = function(load, opts) {
if (!this.builder)
return '';
var loader = this;

@@ -120,2 +127,4 @@ return getBuilder(loader).then(function(builder) {

exports.instantiate = function(load, opts) {
if (!this.builder)
return;
var loader = this;

@@ -122,0 +131,0 @@ return getBuilder(loader).then(function(builder) {

{
"name": "systemjs-plugin-css",
"version": "0.1.27",
"version": "0.1.28",
"main": "css",

@@ -19,3 +19,6 @@ "registry": "jspm",

"systemjs-builder": "^0.15.17"
},
"scripts": {
"phantom-test": "phantomjs test/phantom.js"
}
}

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

});
it('Should support buildCSS: false', function() {
var builder = new Builder();
builder.config(System.getConfig());
builder.config({ buildCSS: false });
return builder.bundle('test/data/test.css!', {minify: false}).then(function(results) {
return expect(results.source).to.equal('');
});
})
});
});

Sorry, the diff of this file is not supported yet