update require.js
This commit is contained in:
parent
8d45a2d209
commit
bb55802197
2 changed files with 118 additions and 99 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
/** vim: et:ts=4:sw=4:sts=4
|
/** vim: et:ts=4:sw=4:sts=4
|
||||||
* @license RequireJS 2.1.9+ Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
|
* @license RequireJS 2.1.11+ Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
|
||||||
* Available via the MIT or new BSD license.
|
* Available via the MIT or new BSD license.
|
||||||
* see: http://github.com/jrburke/requirejs for details
|
* see: http://github.com/jrburke/requirejs for details
|
||||||
*/
|
*/
|
||||||
|
|
@ -12,7 +12,7 @@ var requirejs, require, define;
|
||||||
(function (global) {
|
(function (global) {
|
||||||
var req, s, head, baseElement, dataMain, src,
|
var req, s, head, baseElement, dataMain, src,
|
||||||
interactiveScript, currentlyAddingScript, mainScript, subPath,
|
interactiveScript, currentlyAddingScript, mainScript, subPath,
|
||||||
version = '2.1.9+',
|
version = '2.1.11+',
|
||||||
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
|
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
|
||||||
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
|
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
|
||||||
jsSuffixRegExp = /\.js$/,
|
jsSuffixRegExp = /\.js$/,
|
||||||
|
|
@ -108,7 +108,10 @@ var requirejs, require, define;
|
||||||
if (source) {
|
if (source) {
|
||||||
eachProp(source, function (value, prop) {
|
eachProp(source, function (value, prop) {
|
||||||
if (force || !hasProp(target, prop)) {
|
if (force || !hasProp(target, prop)) {
|
||||||
if (deepStringMixin && typeof value !== 'string') {
|
if (deepStringMixin && typeof value === 'object' && value &&
|
||||||
|
!isArray(value) && !isFunction(value) &&
|
||||||
|
!(value instanceof RegExp)) {
|
||||||
|
|
||||||
if (!target[prop]) {
|
if (!target[prop]) {
|
||||||
target[prop] = {};
|
target[prop] = {};
|
||||||
}
|
}
|
||||||
|
|
@ -138,7 +141,7 @@ var requirejs, require, define;
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Allow getting a global that expressed in
|
//Allow getting a global that is expressed in
|
||||||
//dot notation, like 'a.b.c'.
|
//dot notation, like 'a.b.c'.
|
||||||
function getGlobal(value) {
|
function getGlobal(value) {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
|
|
@ -177,7 +180,7 @@ var requirejs, require, define;
|
||||||
|
|
||||||
if (typeof requirejs !== 'undefined') {
|
if (typeof requirejs !== 'undefined') {
|
||||||
if (isFunction(requirejs)) {
|
if (isFunction(requirejs)) {
|
||||||
//Do not overwrite and existing requirejs instance.
|
//Do not overwrite an existing requirejs instance.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cfg = requirejs;
|
cfg = requirejs;
|
||||||
|
|
@ -201,6 +204,7 @@ var requirejs, require, define;
|
||||||
waitSeconds: 7,
|
waitSeconds: 7,
|
||||||
baseUrl: './',
|
baseUrl: './',
|
||||||
paths: {},
|
paths: {},
|
||||||
|
bundles: {},
|
||||||
pkgs: {},
|
pkgs: {},
|
||||||
shim: {},
|
shim: {},
|
||||||
config: {}
|
config: {}
|
||||||
|
|
@ -214,6 +218,7 @@ var requirejs, require, define;
|
||||||
defQueue = [],
|
defQueue = [],
|
||||||
defined = {},
|
defined = {},
|
||||||
urlFetched = {},
|
urlFetched = {},
|
||||||
|
bundlesMap = {},
|
||||||
requireCounter = 1,
|
requireCounter = 1,
|
||||||
unnormalizedCounter = 1;
|
unnormalizedCounter = 1;
|
||||||
|
|
||||||
|
|
@ -227,8 +232,8 @@ var requirejs, require, define;
|
||||||
* @param {Array} ary the array of path segments.
|
* @param {Array} ary the array of path segments.
|
||||||
*/
|
*/
|
||||||
function trimDots(ary) {
|
function trimDots(ary) {
|
||||||
var i, part;
|
var i, part, length = ary.length;
|
||||||
for (i = 0; ary[i]; i += 1) {
|
for (i = 0; i < length; i++) {
|
||||||
part = ary[i];
|
part = ary[i];
|
||||||
if (part === '.') {
|
if (part === '.') {
|
||||||
ary.splice(i, 1);
|
ary.splice(i, 1);
|
||||||
|
|
@ -261,7 +266,7 @@ var requirejs, require, define;
|
||||||
* @returns {String} normalized name
|
* @returns {String} normalized name
|
||||||
*/
|
*/
|
||||||
function normalize(name, baseName, applyMap) {
|
function normalize(name, baseName, applyMap) {
|
||||||
var pkgName, pkgConfig, mapValue, nameParts, i, j, nameSegment,
|
var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
|
||||||
foundMap, foundI, foundStarMap, starI,
|
foundMap, foundI, foundStarMap, starI,
|
||||||
baseParts = baseName && baseName.split('/'),
|
baseParts = baseName && baseName.split('/'),
|
||||||
normalizedBaseParts = baseParts,
|
normalizedBaseParts = baseParts,
|
||||||
|
|
@ -274,29 +279,26 @@ var requirejs, require, define;
|
||||||
//otherwise, assume it is a top-level require that will
|
//otherwise, assume it is a top-level require that will
|
||||||
//be relative to baseUrl in the end.
|
//be relative to baseUrl in the end.
|
||||||
if (baseName) {
|
if (baseName) {
|
||||||
if (getOwn(config.pkgs, baseName)) {
|
//Convert baseName to array, and lop off the last part,
|
||||||
//If the baseName is a package name, then just treat it as one
|
//so that . matches that 'directory' and not name of the baseName's
|
||||||
//name to concat the name with.
|
//module. For instance, baseName of 'one/two/three', maps to
|
||||||
normalizedBaseParts = baseParts = [baseName];
|
//'one/two/three.js', but we want the directory, 'one/two' for
|
||||||
} else {
|
//this normalization.
|
||||||
//Convert baseName to array, and lop off the last part,
|
normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
|
||||||
//so that . matches that 'directory' and not name of the baseName's
|
name = name.split('/');
|
||||||
//module. For instance, baseName of 'one/two/three', maps to
|
lastIndex = name.length - 1;
|
||||||
//'one/two/three.js', but we want the directory, 'one/two' for
|
|
||||||
//this normalization.
|
// If wanting node ID compatibility, strip .js from end
|
||||||
normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
|
// of IDs. Have to do this here, and not in nameToUrl
|
||||||
|
// because node allows either .js or non .js to map
|
||||||
|
// to same file.
|
||||||
|
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
|
||||||
|
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
name = normalizedBaseParts.concat(name.split('/'));
|
name = normalizedBaseParts.concat(name);
|
||||||
trimDots(name);
|
trimDots(name);
|
||||||
|
|
||||||
//Some use of packages may use a . path to reference the
|
|
||||||
//'main' module name, so normalize for that.
|
|
||||||
pkgConfig = getOwn(config.pkgs, (pkgName = name[0]));
|
|
||||||
name = name.join('/');
|
name = name.join('/');
|
||||||
if (pkgConfig && name === pkgName + '/' + pkgConfig.main) {
|
|
||||||
name = pkgName;
|
|
||||||
}
|
|
||||||
} else if (name.indexOf('./') === 0) {
|
} else if (name.indexOf('./') === 0) {
|
||||||
// No baseName, so this is ID is resolved relative
|
// No baseName, so this is ID is resolved relative
|
||||||
// to baseUrl, pull off the leading dot.
|
// to baseUrl, pull off the leading dot.
|
||||||
|
|
@ -308,7 +310,7 @@ var requirejs, require, define;
|
||||||
if (applyMap && map && (baseParts || starMap)) {
|
if (applyMap && map && (baseParts || starMap)) {
|
||||||
nameParts = name.split('/');
|
nameParts = name.split('/');
|
||||||
|
|
||||||
for (i = nameParts.length; i > 0; i -= 1) {
|
outerLoop: for (i = nameParts.length; i > 0; i -= 1) {
|
||||||
nameSegment = nameParts.slice(0, i).join('/');
|
nameSegment = nameParts.slice(0, i).join('/');
|
||||||
|
|
||||||
if (baseParts) {
|
if (baseParts) {
|
||||||
|
|
@ -325,16 +327,12 @@ var requirejs, require, define;
|
||||||
//Match, update name to the new value.
|
//Match, update name to the new value.
|
||||||
foundMap = mapValue;
|
foundMap = mapValue;
|
||||||
foundI = i;
|
foundI = i;
|
||||||
break;
|
break outerLoop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (foundMap) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Check for a star map match, but just hold on to it,
|
//Check for a star map match, but just hold on to it,
|
||||||
//if there is a shorter segment match later in a matching
|
//if there is a shorter segment match later in a matching
|
||||||
//config, then favor over this star map.
|
//config, then favor over this star map.
|
||||||
|
|
@ -355,7 +353,11 @@ var requirejs, require, define;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return name;
|
// If the name points to a package's name, use
|
||||||
|
// the package main instead.
|
||||||
|
pkgMain = getOwn(config.pkgs, name);
|
||||||
|
|
||||||
|
return pkgMain ? pkgMain : name;
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeScript(name) {
|
function removeScript(name) {
|
||||||
|
|
@ -377,7 +379,13 @@ var requirejs, require, define;
|
||||||
//retry
|
//retry
|
||||||
pathConfig.shift();
|
pathConfig.shift();
|
||||||
context.require.undef(id);
|
context.require.undef(id);
|
||||||
context.require([id]);
|
|
||||||
|
//Custom require that does not do map translation, since
|
||||||
|
//ID is "absolute", already mapped/resolved.
|
||||||
|
context.makeRequire(null, {
|
||||||
|
skipMap: true
|
||||||
|
})([id]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -565,7 +573,7 @@ var requirejs, require, define;
|
||||||
mod.usingExports = true;
|
mod.usingExports = true;
|
||||||
if (mod.map.isDefine) {
|
if (mod.map.isDefine) {
|
||||||
if (mod.exports) {
|
if (mod.exports) {
|
||||||
return mod.exports;
|
return (defined[mod.map.id] = mod.exports);
|
||||||
} else {
|
} else {
|
||||||
return (mod.exports = defined[mod.map.id] = {});
|
return (mod.exports = defined[mod.map.id] = {});
|
||||||
}
|
}
|
||||||
|
|
@ -579,15 +587,9 @@ var requirejs, require, define;
|
||||||
id: mod.map.id,
|
id: mod.map.id,
|
||||||
uri: mod.map.url,
|
uri: mod.map.url,
|
||||||
config: function () {
|
config: function () {
|
||||||
var c,
|
return getOwn(config.config, mod.map.id) || {};
|
||||||
pkg = getOwn(config.pkgs, mod.map.id);
|
|
||||||
// For packages, only support config targeted
|
|
||||||
// at the main module.
|
|
||||||
c = pkg ? getOwn(config.config, mod.map.id + '/' + pkg.main) :
|
|
||||||
getOwn(config.config, mod.map.id);
|
|
||||||
return c || {};
|
|
||||||
},
|
},
|
||||||
exports: defined[mod.map.id]
|
exports: mod.exports || (mod.exports = {})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -870,17 +872,14 @@ var requirejs, require, define;
|
||||||
exports = context.execCb(id, factory, depExports, exports);
|
exports = context.execCb(id, factory, depExports, exports);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.map.isDefine) {
|
// Favor return value over exports. If node/cjs in play,
|
||||||
//If setting exports via 'module' is in play,
|
// then will not have a return value anyway. Favor
|
||||||
//favor that over return value and exports. After that,
|
// module.exports assignment over exports object.
|
||||||
//favor a non-undefined return value over exports use.
|
if (this.map.isDefine && exports === undefined) {
|
||||||
cjsModule = this.module;
|
cjsModule = this.module;
|
||||||
if (cjsModule &&
|
if (cjsModule) {
|
||||||
cjsModule.exports !== undefined &&
|
|
||||||
//Make sure it is not already the exports value
|
|
||||||
cjsModule.exports !== this.exports) {
|
|
||||||
exports = cjsModule.exports;
|
exports = cjsModule.exports;
|
||||||
} else if (exports === undefined && this.usingExports) {
|
} else if (this.usingExports) {
|
||||||
//exports already set the defined value.
|
//exports already set the defined value.
|
||||||
exports = this.exports;
|
exports = this.exports;
|
||||||
}
|
}
|
||||||
|
|
@ -940,6 +939,7 @@ var requirejs, require, define;
|
||||||
|
|
||||||
on(pluginMap, 'defined', bind(this, function (plugin) {
|
on(pluginMap, 'defined', bind(this, function (plugin) {
|
||||||
var load, normalizedMap, normalizedMod,
|
var load, normalizedMap, normalizedMod,
|
||||||
|
bundleId = getOwn(bundlesMap, this.map.id),
|
||||||
name = this.map.name,
|
name = this.map.name,
|
||||||
parentName = this.map.parentMap ? this.map.parentMap.name : null,
|
parentName = this.map.parentMap ? this.map.parentMap.name : null,
|
||||||
localRequire = context.makeRequire(map.parentMap, {
|
localRequire = context.makeRequire(map.parentMap, {
|
||||||
|
|
@ -985,6 +985,14 @@ var requirejs, require, define;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//If a paths config, then just load that file instead to
|
||||||
|
//resolve the plugin, as it is built into that paths layer.
|
||||||
|
if (bundleId) {
|
||||||
|
this.map.url = context.nameToUrl(bundleId);
|
||||||
|
this.load();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
load = bind(this, function (value) {
|
load = bind(this, function (value) {
|
||||||
this.init([], function () { return value; }, null, {
|
this.init([], function () { return value; }, null, {
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
@ -1249,31 +1257,38 @@ var requirejs, require, define;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Save off the paths and packages since they require special processing,
|
//Save off the paths since they require special processing,
|
||||||
//they are additive.
|
//they are additive.
|
||||||
var pkgs = config.pkgs,
|
var shim = config.shim,
|
||||||
shim = config.shim,
|
|
||||||
objs = {
|
objs = {
|
||||||
paths: true,
|
paths: true,
|
||||||
|
bundles: true,
|
||||||
config: true,
|
config: true,
|
||||||
map: true
|
map: true
|
||||||
};
|
};
|
||||||
|
|
||||||
eachProp(cfg, function (value, prop) {
|
eachProp(cfg, function (value, prop) {
|
||||||
if (objs[prop]) {
|
if (objs[prop]) {
|
||||||
if (prop === 'map') {
|
if (!config[prop]) {
|
||||||
if (!config.map) {
|
config[prop] = {};
|
||||||
config.map = {};
|
|
||||||
}
|
|
||||||
mixin(config[prop], value, true, true);
|
|
||||||
} else {
|
|
||||||
mixin(config[prop], value, true);
|
|
||||||
}
|
}
|
||||||
|
mixin(config[prop], value, true, true);
|
||||||
} else {
|
} else {
|
||||||
config[prop] = value;
|
config[prop] = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Reverse map the bundles
|
||||||
|
if (cfg.bundles) {
|
||||||
|
eachProp(cfg.bundles, function (value, prop) {
|
||||||
|
each(value, function (v) {
|
||||||
|
if (v !== prop) {
|
||||||
|
bundlesMap[v] = prop;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//Merge shim
|
//Merge shim
|
||||||
if (cfg.shim) {
|
if (cfg.shim) {
|
||||||
eachProp(cfg.shim, function (value, id) {
|
eachProp(cfg.shim, function (value, id) {
|
||||||
|
|
@ -1294,29 +1309,25 @@ var requirejs, require, define;
|
||||||
//Adjust packages if necessary.
|
//Adjust packages if necessary.
|
||||||
if (cfg.packages) {
|
if (cfg.packages) {
|
||||||
each(cfg.packages, function (pkgObj) {
|
each(cfg.packages, function (pkgObj) {
|
||||||
var location;
|
var location, name;
|
||||||
|
|
||||||
pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj;
|
pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj;
|
||||||
|
|
||||||
|
name = pkgObj.name;
|
||||||
location = pkgObj.location;
|
location = pkgObj.location;
|
||||||
|
if (location) {
|
||||||
|
config.paths[name] = pkgObj.location;
|
||||||
|
}
|
||||||
|
|
||||||
//Create a brand new object on pkgs, since currentPackages can
|
//Save pointer to main module ID for pkg name.
|
||||||
//be passed in again, and config.pkgs is the internal transformed
|
//Remove leading dot in main, so main paths are normalized,
|
||||||
//state for all package configs.
|
//and remove any trailing .js, since different package
|
||||||
pkgs[pkgObj.name] = {
|
//envs have different conventions: some use a module name,
|
||||||
name: pkgObj.name,
|
//some use a file name.
|
||||||
location: location || pkgObj.name,
|
config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main')
|
||||||
//Remove leading dot in main, so main paths are normalized,
|
.replace(currDirRegExp, '')
|
||||||
//and remove any trailing .js, since different package
|
.replace(jsSuffixRegExp, '');
|
||||||
//envs have different conventions: some use a module name,
|
|
||||||
//some use a file name.
|
|
||||||
main: (pkgObj.main || 'main')
|
|
||||||
.replace(currDirRegExp, '')
|
|
||||||
.replace(jsSuffixRegExp, '')
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//Done with modifications, assing packages back to context config
|
|
||||||
config.pkgs = pkgs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//If there are any "waiting to execute" modules in the registry,
|
//If there are any "waiting to execute" modules in the registry,
|
||||||
|
|
@ -1497,7 +1508,7 @@ var requirejs, require, define;
|
||||||
/**
|
/**
|
||||||
* Called to enable a module if it is still in the registry
|
* Called to enable a module if it is still in the registry
|
||||||
* awaiting enablement. A second arg, parent, the parent module,
|
* awaiting enablement. A second arg, parent, the parent module,
|
||||||
* is passed in for context, when this method is overriden by
|
* is passed in for context, when this method is overridden by
|
||||||
* the optimizer. Not shown here to keep code compact.
|
* the optimizer. Not shown here to keep code compact.
|
||||||
*/
|
*/
|
||||||
enable: function (depMap) {
|
enable: function (depMap) {
|
||||||
|
|
@ -1571,8 +1582,19 @@ var requirejs, require, define;
|
||||||
* internal API, not a public one. Use toUrl for the public API.
|
* internal API, not a public one. Use toUrl for the public API.
|
||||||
*/
|
*/
|
||||||
nameToUrl: function (moduleName, ext, skipExt) {
|
nameToUrl: function (moduleName, ext, skipExt) {
|
||||||
var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url,
|
var paths, syms, i, parentModule, url,
|
||||||
parentPath;
|
parentPath, bundleId,
|
||||||
|
pkgMain = getOwn(config.pkgs, moduleName);
|
||||||
|
|
||||||
|
if (pkgMain) {
|
||||||
|
moduleName = pkgMain;
|
||||||
|
}
|
||||||
|
|
||||||
|
bundleId = getOwn(bundlesMap, moduleName);
|
||||||
|
|
||||||
|
if (bundleId) {
|
||||||
|
return context.nameToUrl(bundleId, ext, skipExt);
|
||||||
|
}
|
||||||
|
|
||||||
//If a colon is in the URL, it indicates a protocol is used and it is just
|
//If a colon is in the URL, it indicates a protocol is used and it is just
|
||||||
//an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)
|
//an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)
|
||||||
|
|
@ -1586,7 +1608,6 @@ var requirejs, require, define;
|
||||||
} else {
|
} else {
|
||||||
//A module that needs to be converted to a path.
|
//A module that needs to be converted to a path.
|
||||||
paths = config.paths;
|
paths = config.paths;
|
||||||
pkgs = config.pkgs;
|
|
||||||
|
|
||||||
syms = moduleName.split('/');
|
syms = moduleName.split('/');
|
||||||
//For each module name segment, see if there is a path
|
//For each module name segment, see if there is a path
|
||||||
|
|
@ -1594,7 +1615,7 @@ var requirejs, require, define;
|
||||||
//and work up from it.
|
//and work up from it.
|
||||||
for (i = syms.length; i > 0; i -= 1) {
|
for (i = syms.length; i > 0; i -= 1) {
|
||||||
parentModule = syms.slice(0, i).join('/');
|
parentModule = syms.slice(0, i).join('/');
|
||||||
pkg = getOwn(pkgs, parentModule);
|
|
||||||
parentPath = getOwn(paths, parentModule);
|
parentPath = getOwn(paths, parentModule);
|
||||||
if (parentPath) {
|
if (parentPath) {
|
||||||
//If an array, it means there are a few choices,
|
//If an array, it means there are a few choices,
|
||||||
|
|
@ -1604,16 +1625,6 @@ var requirejs, require, define;
|
||||||
}
|
}
|
||||||
syms.splice(0, i, parentPath);
|
syms.splice(0, i, parentPath);
|
||||||
break;
|
break;
|
||||||
} else if (pkg) {
|
|
||||||
//If module name is just the package name, then looking
|
|
||||||
//for the main module.
|
|
||||||
if (moduleName === pkg.name) {
|
|
||||||
pkgPath = pkg.location + '/' + pkg.main;
|
|
||||||
} else {
|
|
||||||
pkgPath = pkg.location;
|
|
||||||
}
|
|
||||||
syms.splice(0, i, pkgPath);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,11 @@ var deps = {
|
||||||
url: "https://raw.github.com/stubbornella/csslint/master/release/csslint.js",
|
url: "https://raw.github.com/stubbornella/csslint/master/release/csslint.js",
|
||||||
needsFixup: true,
|
needsFixup: true,
|
||||||
browserify: {
|
browserify: {
|
||||||
npmModule: "csslint@latest",
|
npmModule: "git+https://github.com/stubbornella/csslint.git#master",
|
||||||
path: "jshint/src/jshint.js",
|
path: "jshint/src/jshint.js",
|
||||||
exports: "jshint"
|
exports: "jshint"
|
||||||
},
|
},
|
||||||
|
fetch: browserify,
|
||||||
},
|
},
|
||||||
requirejs: {
|
requirejs: {
|
||||||
path: "../../demo/kitchen-sink/require.js",
|
path: "../../demo/kitchen-sink/require.js",
|
||||||
|
|
@ -242,5 +243,12 @@ function browserify(_, cb) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
getDep(deps.html5)
|
var args = process.argv.slice(2);
|
||||||
getDep(deps.jshint)
|
args = args.filter(function(x) {return x[0] != "-" });
|
||||||
|
if (!args.length)
|
||||||
|
args = Object.keys(deps);
|
||||||
|
|
||||||
|
args.forEach(function(key) {
|
||||||
|
getDep(deps[key])
|
||||||
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue