asynquence
Advanced tools
Comparing version 0.2.0-a to 0.2.0-b
@@ -9,8 +9,14 @@ #!/usr/bin/env node | ||
var st = fs.statSync(path.join(dir,file)), | ||
contents, collection_id | ||
contents, collection_id, | ||
plugin_name = file.replace(/plugin\.(.*)\.js/,"$1").toLowerCase() | ||
; | ||
// template file to read contents and compile? | ||
if (st.isFile() && /^plugin\..*\.js$/.test(file)) { | ||
console.log("Bundling plugin: " + file); | ||
if (st.isFile() && /^plugin\..*\.js$/.test(file) && | ||
( | ||
!which_plugins || | ||
~which_plugins.indexOf(plugin_name) | ||
) | ||
) { | ||
console.log("Bundling plugin: " + plugin_name); | ||
@@ -27,8 +33,19 @@ bundle_str += fs.readFileSync(path.join(dir,file),{ encoding: "utf8" }); | ||
fs = require("fs"), | ||
exec = require("child_process").exec, | ||
bundle_str = "", | ||
bundle_wrapper = fs.readFileSync(path.join(__dirname,"contrib-wrapper.js"),{ encoding: "utf8" }) | ||
bundle_wrapper = fs.readFileSync(path.join(__dirname,"contrib-wrapper.js"),{ encoding: "utf8" }), | ||
which_plugins = process.argv.length > 2 ? | ||
process.argv.slice(2) : | ||
null | ||
; | ||
if (which_plugins) { | ||
which_plugins = which_plugins.map(function(plugin){ | ||
return plugin.toLowerCase(); | ||
}); | ||
} | ||
console.log("*** Bundling contrib plugins ***"); | ||
@@ -48,9 +65,10 @@ | ||
console.log("Built contrib.src.js bundle.") | ||
console.log("Built contrib.src.js."); | ||
console.log("Minifying to contrib.js."); | ||
var exec = require("child_process").exec; | ||
exec("node_modules/.bin/uglifyjs contrib.src.js --comments '/^\!/' --mangle --compress --output contrib.js",function(){ | ||
// ensure trailing new-line | ||
fs.appendFileSync(path.join(__dirname,"..","contrib.js"),"\n"); | ||
exec("node_modules/.bin/uglifyjs contrib.src.js --comments '/^\!/' --mangle --compress --output contrib.js"); | ||
console.log("Complete."); | ||
console.log("Complete."); | ||
}); |
{ | ||
"name": "asynquence", | ||
"version": "0.2.0-a", | ||
"version": "0.2.0-b", | ||
"description": "asynquence: async sequences & gates for flow-control", | ||
@@ -8,3 +8,4 @@ "main": "./asq.js", | ||
"test": "./node-tests.js", | ||
"bundle-plugins": "./contrib/bundle.js" | ||
"build-core": "./build-core.js", | ||
"bundle-contrib": "./contrib/bundle.js" | ||
}, | ||
@@ -11,0 +12,0 @@ "devDependencies": { |
@@ -75,3 +75,3 @@ # asynquence | ||
The `/contrib/*` plugins provide a variety of [optional plugins](/getify/asynquence/blob/master/contrib/README.md) as helpers for async flow controls. | ||
The `/contrib/*` plugins provide a variety of [optional plugins](https://github.com/getify/asynquence/blob/master/contrib/README.md) as helpers for async flow controls. | ||
@@ -78,0 +78,0 @@ ### Multiple parameters |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
89135
24
2686
7