async-define
Advanced tools
Comparing version 3.2.1 to 3.2.2
@@ -96,24 +96,5 @@ (function (cb){ | ||
function ie(moduleName, iecb) { | ||
var script = document.querySelector('script#' + moduleName) | ||
var link = document.querySelector('link#' + moduleName) | ||
if (!script && link) { | ||
var src = link.href | ||
script = document.createElement('script') | ||
script.id = moduleName | ||
script.src = src | ||
document.head.appendChild(script) | ||
} | ||
if (!('Promise' in w)) { | ||
return ad([moduleName], iecb) | ||
} | ||
return new Promise(function (resolve) { | ||
ad([moduleName], resolve) | ||
}); | ||
} | ||
cb.call(w, ad, ie) | ||
}(function (define, importExternal) { | ||
cb.call(w, ad) | ||
}(function (define) { | ||
if (typeof exports === 'object'){ | ||
define.importExternal = importExternal; | ||
module.exports = define; | ||
@@ -123,3 +104,2 @@ } | ||
this.asyncDefine = define; | ||
this.importExternal = importExternal; | ||
} | ||
@@ -126,0 +106,0 @@ |
{ | ||
"name": "async-define", | ||
"version": "3.2.1", | ||
"version": "3.2.2", | ||
"description": "Coordinate the execution of asynchronous scripts", | ||
@@ -8,3 +8,3 @@ "main": "lib/asyncDefine.js", | ||
"prepublish": "npm run build", | ||
"test": "npm run build && mocha tests/*.js", | ||
"test": "npm run build && mocha", | ||
"serve": "http-server -p 9090 demo", | ||
@@ -16,6 +16,3 @@ "build": "bin/async-define-bundle.js -f=templates/umd.js > lib/asyncDefine.js", | ||
"build:main": "browserify demo/main.js -o demo/dist/main.js", | ||
"build:demo": "npm run build && npm run build:jquery && npm run build:react && npm run build:react-dom && npm run build:main", | ||
"release:major": "./node_modules/.bin/npm-release major", | ||
"release:minor": "./node_modules/.bin/npm-release minor", | ||
"release:patch": "./node_modules/.bin/npm-release patch" | ||
"build:demo": "npm run build && npm run build:jquery && npm run build:react && npm run build:react-dom && npm run build:main" | ||
}, | ||
@@ -33,4 +30,3 @@ "bin": { | ||
"jquery": "^3.3.1", | ||
"mocha": "^2.1.0", | ||
"npm-release": "^1.0.0", | ||
"mocha": "^5.2.0", | ||
"react": "^0.14.3", | ||
@@ -37,0 +33,0 @@ "react-dom": "^0.14.3", |
if (typeof exports === 'object'){ | ||
define.importExternal = importExternal; | ||
module.exports = define; | ||
@@ -7,3 +6,2 @@ } | ||
this.asyncDefine = define; | ||
this.importExternal = importExternal; | ||
} |
Sorry, the diff of this file is not supported yet
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
8
20845
323