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

browserify-async-define

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify-async-define - npm Package Compare versions

Comparing version 2.0.9 to 2.1.0

8

index.js

@@ -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);
}

5

package.json
{
"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){

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