Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

builder-amd-css

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

builder-amd-css - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

49

index.js

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

var mutex, queue, requireCssFiles,
var requireCssFiles,
fs = require( "fs" ),

@@ -8,3 +8,2 @@ glob = require( "glob" ),

queue = [];
requireCssFiles = {};

@@ -16,29 +15,5 @@

function enqueueBuildCss() {
queue.push( arguments );
if ( queue.length === 1 ) {
dequeueBuildCss();
}
}
function dequeueBuildCss() {
var callback;
var args = queue[ 0 ];
if ( args !== undefined ) {
callback = args[ 2 ];
args[ 2 ] = function() {
callback.apply( {}, arguments );
queue.shift();
dequeueBuildCss();
};
buildCss.apply( {}, args );
}
}
function buildCss( files, config, callback ) {
var localCallback, include;
var include;
if ( mutex ) {
return callback( new Error( "Concurrent calls not supported" ) );
}
if ( typeof config !== "object" ) {

@@ -50,7 +25,2 @@ return callback( new Error( "missing or invalid config (object expected)" ) );

}
mutex = true;
localCallback = function( error, css ) {
mutex = false;
callback( error, css, files );
};

@@ -98,6 +68,11 @@ include = config.include;

requirejs.setFiles( files );
requirejs.optimize( config, function() {
localCallback( null, files[ "dist/output.css" ] );
}, localCallback );
requirejs.setFiles( files, function( done ) {
requirejs.optimize( config, function() {
callback( null, files[ "dist/output.css" ], files );
done();
}, function( error ) {
callback( error );
done();
});
});
}

@@ -120,3 +95,3 @@

enqueueBuildCss( clonedFiles, config, callback );
buildCss( clonedFiles, config, callback );
};
{
"name": "builder-amd-css",
"version": "0.0.4",
"version": "0.0.5",
"main": "index.js",

@@ -29,3 +29,3 @@ "repository": {

"glob": "4.3.5",
"requirejs-memfiles": ">2.1.15-0 <=2.1.15"
"requirejs-memfiles": ">=2.1.15-3 <=2.1.15"
},

@@ -32,0 +32,0 @@ "devDependencies": {

@@ -52,3 +52,3 @@ ## Why builder-amd-css?

**requirejsConfig** *Object* [require.js build configuration][
**requirejsConfig** *Object* [require.js build configuration][].

@@ -55,0 +55,0 @@ **callback** *Function* called with three arguments: null or an Error object, a

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