browserify-async-define
Advanced tools
Comparing version 2.0.9 to 2.1.0
@@ -11,2 +11,5 @@ var path = require('path'); | ||
var mangleName = utils.mangleName; | ||
var bundleCollapser = require('bundle-collapser/plugin'); | ||
var adPathName = require.resolve('async-define'); | ||
// var adPathName = 'async-define'; | ||
@@ -81,3 +84,3 @@ temp.track(); // remove temp files | ||
var name = t[0]; | ||
return "require('async-define')(" + quote(label) + ", function(){return " + mangleName(name) + ";});" | ||
return "require('" + adPathName + "')(" + quote(label) + ", function(){return " + mangleName(name) + ";});" | ||
}) | ||
@@ -144,2 +147,3 @@ .join('\n'); | ||
b.transform(transformer.requireTransform, { | ||
@@ -191,2 +195,3 @@ verbose: !!opts.verbose, | ||
var b = browserify(f, {basedir: process.cwd(), paths: ['./node_modules']}); | ||
b.plugin(bundleCollapser); | ||
var writableStream = fs.createWriteStream(bundlePath); | ||
@@ -215,2 +220,3 @@ mkdirp.sync(path.dirname(bundlePath)); | ||
})); | ||
b.plugin(bundleCollapser); | ||
} |
{ | ||
"name": "browserify-async-define", | ||
"version": "2.0.9", | ||
"version": "2.1.0", | ||
"description": "Browserify plugin for async-define", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"build-main": "browserify demo/main/main.js -o demo/dist/main.js -p [./index.js -d jquery:jquery20:demo/dist/jquery.js -d react:react014:demo/dist/react.js -d react-dom:reactDom014:demo/dist/react.js --verbose]", | ||
"build-bundle": "browserify demo/bundle/jquery.js -o demo/dist/jquerytest.js -p [./index.js -e demo/bundle/jquery.js:jquery --verbose]", | ||
"build-bundle": "browserify demo/bundle/jquery.js -o demo/dist/jquery.js -p [./index.js -e demo/bundle/jquery.js:jquery --verbose]", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
@@ -34,2 +34,3 @@ "serve": "http-server -p 9090 demo", | ||
"browserify-transform-tools": "^1.5.0", | ||
"bundle-collapser": "^1.2.1", | ||
"mkdirp": "^0.5.1", | ||
@@ -36,0 +37,0 @@ "temp": "^0.8.3", |
@@ -6,2 +6,3 @@ var path = require('path'); | ||
var mangleName = utils.mangleName; | ||
var adPathName = require.resolve('async-define'); | ||
@@ -12,3 +13,3 @@ function wrap(exports, deps, sym, body){ | ||
var s = sym ? quote(sym) + "," : ""; | ||
var out = ["require('async-define')(" + s + d + "function (" + a + "){"]; | ||
var out = ["require('" + adPathName + "')(" + s + d + "function (" + a + "){"]; | ||
out.push(body); | ||
@@ -15,0 +16,0 @@ if (sym){ |
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
13611
284
6
+ Addedbundle-collapser@^1.2.1
+ AddedJSONStream@1.3.5(transitive)
+ Addedacorn-node@1.8.2(transitive)
+ Addedacorn-walk@7.2.0(transitive)
+ Addedbrowser-pack@6.1.0(transitive)
+ Addedbrowser-unpack@1.4.3(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedbundle-collapser@1.4.0(transitive)
+ Addedcombine-source-map@0.8.0(transitive)
+ Addedconcat-stream@1.6.2(transitive)
+ Addedconvert-source-map@1.1.3(transitive)
+ Addeddefined@1.0.1(transitive)
+ Addedinline-source-map@0.6.3(transitive)
+ Addedjsonparse@1.3.1(transitive)
+ Addedlodash.memoize@3.0.4(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedtypedarray@0.0.6(transitive)
+ Addedumd@3.0.3(transitive)