Merge pull request #1885 from ajaxorg/update_deps
update saxparser and jshint
This commit is contained in:
commit
bb10f4661d
7 changed files with 10568 additions and 11000 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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -368,6 +368,7 @@ exports.runEmmetCommand = function(editor) {
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
editor._signal("changeStatus", typeof e == "string" ? e : e.message);
|
editor._signal("changeStatus", typeof e == "string" ? e : e.message);
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
result = false
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
define(function(require, exports, module) {
|
define(function(require, exports, module) {
|
||||||
/*!
|
/*!
|
||||||
CSSLint
|
CSSLint
|
||||||
Copyright (c) 2013 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
|
Copyright (c) 2014 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
/* Build: v0.10.0 15-August-2013 01:07:22 */
|
/* Build: v0.10.0 31-March-2014 08:16:48 */
|
||||||
/*!
|
/*!
|
||||||
Parser-Lib
|
Parser-Lib
|
||||||
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
|
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
|
||||||
|
|
@ -46,7 +46,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
/* Version v0.2.3, Build time: 19-June-2013 11:16:15 */
|
/* Version v0.2.4, Build time: 7-January-2014 07:32:49 */
|
||||||
var parserlib = {};
|
var parserlib = {};
|
||||||
(function(){
|
(function(){
|
||||||
|
|
||||||
|
|
@ -956,7 +956,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
/* Version v0.2.3, Build time: 19-June-2013 11:16:15 */
|
/* Version v0.2.4, Build time: 7-January-2014 07:32:49 */
|
||||||
(function(){
|
(function(){
|
||||||
var EventTarget = parserlib.util.EventTarget,
|
var EventTarget = parserlib.util.EventTarget,
|
||||||
TokenStreamBase = parserlib.util.TokenStreamBase,
|
TokenStreamBase = parserlib.util.TokenStreamBase,
|
||||||
|
|
@ -991,6 +991,7 @@ var Colors = {
|
||||||
darkcyan :"#008b8b",
|
darkcyan :"#008b8b",
|
||||||
darkgoldenrod :"#b8860b",
|
darkgoldenrod :"#b8860b",
|
||||||
darkgray :"#a9a9a9",
|
darkgray :"#a9a9a9",
|
||||||
|
darkgrey :"#a9a9a9",
|
||||||
darkgreen :"#006400",
|
darkgreen :"#006400",
|
||||||
darkkhaki :"#bdb76b",
|
darkkhaki :"#bdb76b",
|
||||||
darkmagenta :"#8b008b",
|
darkmagenta :"#8b008b",
|
||||||
|
|
@ -1002,11 +1003,13 @@ var Colors = {
|
||||||
darkseagreen :"#8fbc8f",
|
darkseagreen :"#8fbc8f",
|
||||||
darkslateblue :"#483d8b",
|
darkslateblue :"#483d8b",
|
||||||
darkslategray :"#2f4f4f",
|
darkslategray :"#2f4f4f",
|
||||||
|
darkslategrey :"#2f4f4f",
|
||||||
darkturquoise :"#00ced1",
|
darkturquoise :"#00ced1",
|
||||||
darkviolet :"#9400d3",
|
darkviolet :"#9400d3",
|
||||||
deeppink :"#ff1493",
|
deeppink :"#ff1493",
|
||||||
deepskyblue :"#00bfff",
|
deepskyblue :"#00bfff",
|
||||||
dimgray :"#696969",
|
dimgray :"#696969",
|
||||||
|
dimgrey :"#696969",
|
||||||
dodgerblue :"#1e90ff",
|
dodgerblue :"#1e90ff",
|
||||||
firebrick :"#b22222",
|
firebrick :"#b22222",
|
||||||
floralwhite :"#fffaf0",
|
floralwhite :"#fffaf0",
|
||||||
|
|
@ -1017,6 +1020,7 @@ var Colors = {
|
||||||
gold :"#ffd700",
|
gold :"#ffd700",
|
||||||
goldenrod :"#daa520",
|
goldenrod :"#daa520",
|
||||||
gray :"#808080",
|
gray :"#808080",
|
||||||
|
grey :"#808080",
|
||||||
green :"#008000",
|
green :"#008000",
|
||||||
greenyellow :"#adff2f",
|
greenyellow :"#adff2f",
|
||||||
honeydew :"#f0fff0",
|
honeydew :"#f0fff0",
|
||||||
|
|
@ -1034,12 +1038,14 @@ var Colors = {
|
||||||
lightcyan :"#e0ffff",
|
lightcyan :"#e0ffff",
|
||||||
lightgoldenrodyellow :"#fafad2",
|
lightgoldenrodyellow :"#fafad2",
|
||||||
lightgray :"#d3d3d3",
|
lightgray :"#d3d3d3",
|
||||||
|
lightgrey :"#d3d3d3",
|
||||||
lightgreen :"#90ee90",
|
lightgreen :"#90ee90",
|
||||||
lightpink :"#ffb6c1",
|
lightpink :"#ffb6c1",
|
||||||
lightsalmon :"#ffa07a",
|
lightsalmon :"#ffa07a",
|
||||||
lightseagreen :"#20b2aa",
|
lightseagreen :"#20b2aa",
|
||||||
lightskyblue :"#87cefa",
|
lightskyblue :"#87cefa",
|
||||||
lightslategray :"#778899",
|
lightslategray :"#778899",
|
||||||
|
lightslategrey :"#778899",
|
||||||
lightsteelblue :"#b0c4de",
|
lightsteelblue :"#b0c4de",
|
||||||
lightyellow :"#ffffe0",
|
lightyellow :"#ffffe0",
|
||||||
lime :"#00ff00",
|
lime :"#00ff00",
|
||||||
|
|
@ -1092,6 +1098,7 @@ var Colors = {
|
||||||
skyblue :"#87ceeb",
|
skyblue :"#87ceeb",
|
||||||
slateblue :"#6a5acd",
|
slateblue :"#6a5acd",
|
||||||
slategray :"#708090",
|
slategray :"#708090",
|
||||||
|
slategrey :"#708090",
|
||||||
snow :"#fffafa",
|
snow :"#fffafa",
|
||||||
springgreen :"#00ff7f",
|
springgreen :"#00ff7f",
|
||||||
steelblue :"#4682b4",
|
steelblue :"#4682b4",
|
||||||
|
|
@ -1117,6 +1124,7 @@ var Colors = {
|
||||||
buttontext :"Text on push buttons.",
|
buttontext :"Text on push buttons.",
|
||||||
captiontext :"Text in caption, size box, and scrollbar arrow box.",
|
captiontext :"Text in caption, size box, and scrollbar arrow box.",
|
||||||
graytext :"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",
|
graytext :"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",
|
||||||
|
greytext :"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.",
|
||||||
highlight :"Item(s) selected in a control.",
|
highlight :"Item(s) selected in a control.",
|
||||||
highlighttext :"Text of item(s) selected in a control.",
|
highlighttext :"Text of item(s) selected in a control.",
|
||||||
inactiveborder :"Inactive window border.",
|
inactiveborder :"Inactive window border.",
|
||||||
|
|
@ -3533,6 +3541,12 @@ nth
|
||||||
var Properties = {
|
var Properties = {
|
||||||
|
|
||||||
//A
|
//A
|
||||||
|
"align-items" : "flex-start | flex-end | center | baseline | stretch",
|
||||||
|
"align-content" : "flex-start | flex-end | center | space-between | space-around | stretch",
|
||||||
|
"align-self" : "auto | flex-start | flex-end | center | baseline | stretch",
|
||||||
|
"-webkit-align-items" : "flex-start | flex-end | center | baseline | stretch",
|
||||||
|
"-webkit-align-content" : "flex-start | flex-end | center | space-between | space-around | stretch",
|
||||||
|
"-webkit-align-self" : "auto | flex-start | flex-end | center | baseline | stretch",
|
||||||
"alignment-adjust" : "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length>",
|
"alignment-adjust" : "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length>",
|
||||||
"alignment-baseline" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
|
"alignment-baseline" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
|
||||||
"animation" : 1,
|
"animation" : 1,
|
||||||
|
|
@ -3728,15 +3742,24 @@ var Properties = {
|
||||||
"border-top-width" : "<border-width>",
|
"border-top-width" : "<border-width>",
|
||||||
"border-width" : { multi: "<border-width>", max: 4 },
|
"border-width" : { multi: "<border-width>", max: 4 },
|
||||||
"bottom" : "<margin-width> | inherit",
|
"bottom" : "<margin-width> | inherit",
|
||||||
"box-align" : "start | end | center | baseline | stretch", //http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/
|
"-moz-box-align" : "start | end | center | baseline | stretch",
|
||||||
"box-decoration-break" : "slice |clone",
|
"-moz-box-decoration-break" : "slice |clone",
|
||||||
"box-direction" : "normal | reverse | inherit",
|
"-moz-box-direction" : "normal | reverse | inherit",
|
||||||
"box-flex" : "<number>",
|
"-moz-box-flex" : "<number>",
|
||||||
"box-flex-group" : "<integer>",
|
"-moz-box-flex-group" : "<integer>",
|
||||||
"box-lines" : "single | multiple",
|
"-moz-box-lines" : "single | multiple",
|
||||||
"box-ordinal-group" : "<integer>",
|
"-moz-box-ordinal-group" : "<integer>",
|
||||||
"box-orient" : "horizontal | vertical | inline-axis | block-axis | inherit",
|
"-moz-box-orient" : "horizontal | vertical | inline-axis | block-axis | inherit",
|
||||||
"box-pack" : "start | end | center | justify",
|
"-moz-box-pack" : "start | end | center | justify",
|
||||||
|
"-webkit-box-align" : "start | end | center | baseline | stretch",
|
||||||
|
"-webkit-box-decoration-break" : "slice |clone",
|
||||||
|
"-webkit-box-direction" : "normal | reverse | inherit",
|
||||||
|
"-webkit-box-flex" : "<number>",
|
||||||
|
"-webkit-box-flex-group" : "<integer>",
|
||||||
|
"-webkit-box-lines" : "single | multiple",
|
||||||
|
"-webkit-box-ordinal-group" : "<integer>",
|
||||||
|
"-webkit-box-orient" : "horizontal | vertical | inline-axis | block-axis | inherit",
|
||||||
|
"-webkit-box-pack" : "start | end | center | justify",
|
||||||
"box-shadow" : function (expression) {
|
"box-shadow" : function (expression) {
|
||||||
var result = false,
|
var result = false,
|
||||||
part;
|
part;
|
||||||
|
|
@ -3782,7 +3805,7 @@ var Properties = {
|
||||||
|
|
||||||
//D
|
//D
|
||||||
"direction" : "ltr | rtl | inherit",
|
"direction" : "ltr | rtl | inherit",
|
||||||
"display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box",
|
"display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | -ms-flexbox | -ms-inline-flexbox | flex | -webkit-flex | inline-flex | -webkit-inline-flex",
|
||||||
"dominant-baseline" : 1,
|
"dominant-baseline" : 1,
|
||||||
"drop-initial-after-adjust" : "central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>",
|
"drop-initial-after-adjust" : "central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>",
|
||||||
"drop-initial-after-align" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
|
"drop-initial-after-align" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
|
||||||
|
|
@ -3799,6 +3822,26 @@ var Properties = {
|
||||||
"filter" : 1,
|
"filter" : 1,
|
||||||
"fit" : "fill | hidden | meet | slice",
|
"fit" : "fill | hidden | meet | slice",
|
||||||
"fit-position" : 1,
|
"fit-position" : 1,
|
||||||
|
"flex" : "none | [ <flex-grow> <flex-shrink>? || <flex-basis>",
|
||||||
|
"flex-basis" : "<width>",
|
||||||
|
"flex-direction" : "row | row-reverse | column | column-reverse",
|
||||||
|
"flex-flow" : "<flex-direction> || <flex-wrap>",
|
||||||
|
"flex-grow" : "<number>",
|
||||||
|
"flex-shrink" : "<number>",
|
||||||
|
"flex-wrap" : "nowrap | wrap | wrap-reverse",
|
||||||
|
"-webkit-flex" : "none | [ <flex-grow> <flex-shrink>? || <flex-basis>",
|
||||||
|
"-webkit-flex-basis" : "<width>",
|
||||||
|
"-webkit-flex-direction" : "row | row-reverse | column | column-reverse",
|
||||||
|
"-webkit-flex-flow" : "<flex-direction> || <flex-wrap>",
|
||||||
|
"-webkit-flex-grow" : "<number>",
|
||||||
|
"-webkit-flex-shrink" : "<number>",
|
||||||
|
"-webkit-flex-wrap" : "nowrap | wrap | wrap-reverse",
|
||||||
|
"-ms-flex" : "[[ <number> <number>? ] || [ <length> || <percentage> || auto ] ] | none",
|
||||||
|
"-ms-flex-align" : "start | end | center | stretch | baseline",
|
||||||
|
"-ms-flex-direction" : "row | column | row-reverse | column-reverse | inherit",
|
||||||
|
"-ms-flex-order" : "<number>",
|
||||||
|
"-ms-flex-pack" : "start | end | center | justify",
|
||||||
|
"-ms-flex-wrap" : "nowrap | wrap | wrap-reverse",
|
||||||
"float" : "left | right | none | inherit",
|
"float" : "left | right | none | inherit",
|
||||||
"float-offset" : 1,
|
"float-offset" : 1,
|
||||||
"font" : 1,
|
"font" : 1,
|
||||||
|
|
@ -3842,6 +3885,10 @@ var Properties = {
|
||||||
"image-resolution" : 1,
|
"image-resolution" : 1,
|
||||||
"inline-box-align" : "initial | last | <integer>",
|
"inline-box-align" : "initial | last | <integer>",
|
||||||
|
|
||||||
|
//J
|
||||||
|
"justify-content" : "flex-start | flex-end | center | space-between | space-around",
|
||||||
|
"-webkit-justify-content" : "flex-start | flex-end | center | space-between | space-around",
|
||||||
|
|
||||||
//L
|
//L
|
||||||
"left" : "<margin-width> | inherit",
|
"left" : "<margin-width> | inherit",
|
||||||
"letter-spacing" : "<length> | normal | inherit",
|
"letter-spacing" : "<length> | normal | inherit",
|
||||||
|
|
@ -3885,6 +3932,8 @@ var Properties = {
|
||||||
|
|
||||||
//O
|
//O
|
||||||
"opacity" : "<number> | inherit",
|
"opacity" : "<number> | inherit",
|
||||||
|
"order" : "<integer>",
|
||||||
|
"-webkit-order" : "<integer>",
|
||||||
"orphans" : "<integer> | inherit",
|
"orphans" : "<integer> | inherit",
|
||||||
"outline" : 1,
|
"outline" : 1,
|
||||||
"outline-color" : "<color> | invert | inherit",
|
"outline-color" : "<color> | invert | inherit",
|
||||||
|
|
@ -3893,6 +3942,7 @@ var Properties = {
|
||||||
"outline-width" : "<border-width> | inherit",
|
"outline-width" : "<border-width> | inherit",
|
||||||
"overflow" : "visible | hidden | scroll | auto | inherit",
|
"overflow" : "visible | hidden | scroll | auto | inherit",
|
||||||
"overflow-style" : 1,
|
"overflow-style" : 1,
|
||||||
|
"overflow-wrap" : "normal | break-word",
|
||||||
"overflow-x" : 1,
|
"overflow-x" : 1,
|
||||||
"overflow-y" : 1,
|
"overflow-y" : 1,
|
||||||
|
|
||||||
|
|
@ -3970,6 +4020,8 @@ var Properties = {
|
||||||
"text-transform" : "capitalize | uppercase | lowercase | none | inherit",
|
"text-transform" : "capitalize | uppercase | lowercase | none | inherit",
|
||||||
"text-wrap" : "normal | none | avoid",
|
"text-wrap" : "normal | none | avoid",
|
||||||
"top" : "<margin-width> | inherit",
|
"top" : "<margin-width> | inherit",
|
||||||
|
"-ms-touch-action" : "auto | none | pan-x | pan-y",
|
||||||
|
"touch-action" : "auto | none | pan-x | pan-y",
|
||||||
"transform" : 1,
|
"transform" : 1,
|
||||||
"transform-origin" : 1,
|
"transform-origin" : 1,
|
||||||
"transform-style" : 1,
|
"transform-style" : 1,
|
||||||
|
|
@ -3980,7 +4032,7 @@ var Properties = {
|
||||||
"transition-timing-function" : 1,
|
"transition-timing-function" : 1,
|
||||||
|
|
||||||
//U
|
//U
|
||||||
"unicode-bidi" : "normal | embed | bidi-override | inherit",
|
"unicode-bidi" : "normal | embed | isolate | bidi-override | isolate-override | plaintext | inherit",
|
||||||
"user-modify" : "read-only | read-write | write-only | inherit",
|
"user-modify" : "read-only | read-write | write-only | inherit",
|
||||||
"user-select" : "none | text | toggle | element | elements | all | inherit",
|
"user-select" : "none | text | toggle | element | elements | all | inherit",
|
||||||
|
|
||||||
|
|
@ -4004,7 +4056,8 @@ var Properties = {
|
||||||
"width" : "<length> | <percentage> | auto | inherit" ,
|
"width" : "<length> | <percentage> | auto | inherit" ,
|
||||||
"word-break" : "normal | keep-all | break-all",
|
"word-break" : "normal | keep-all | break-all",
|
||||||
"word-spacing" : "<length> | normal | inherit",
|
"word-spacing" : "<length> | normal | inherit",
|
||||||
"word-wrap" : 1,
|
"word-wrap" : "normal | break-word",
|
||||||
|
"writing-mode" : "horizontal-tb | vertical-rl | vertical-lr | lr-tb | rl-tb | tb-rl | bt-rl | tb-lr | bt-lr | lr-bt | rl-bt | lr | rl | tb | inherit",
|
||||||
|
|
||||||
//Z
|
//Z
|
||||||
"z-index" : "<integer> | auto | inherit",
|
"z-index" : "<integer> | auto | inherit",
|
||||||
|
|
@ -4275,9 +4328,6 @@ function PropertyValuePart(text, line, col){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (/^([+\-]?[\d\.]+)%$/i.test(text)){ //percentage
|
|
||||||
this.type = "percentage";
|
|
||||||
this.value = +RegExp.$1;
|
|
||||||
} else if (/^([+\-]?[\d\.]+)%$/i.test(text)){ //percentage
|
} else if (/^([+\-]?[\d\.]+)%$/i.test(text)){ //percentage
|
||||||
this.type = "percentage";
|
this.type = "percentage";
|
||||||
this.value = +RegExp.$1;
|
this.value = +RegExp.$1;
|
||||||
|
|
@ -4374,6 +4424,7 @@ PropertyValuePart.prototype.constructor = PropertyValuePart;
|
||||||
PropertyValuePart.fromToken = function(token){
|
PropertyValuePart.fromToken = function(token){
|
||||||
return new PropertyValuePart(token.value, token.startLine, token.startCol);
|
return new PropertyValuePart(token.value, token.startLine, token.startCol);
|
||||||
};
|
};
|
||||||
|
|
||||||
var Pseudos = {
|
var Pseudos = {
|
||||||
":first-letter": 1,
|
":first-letter": 1,
|
||||||
":first-line": 1,
|
":first-line": 1,
|
||||||
|
|
@ -5661,7 +5712,7 @@ var Tokens = [
|
||||||
{ name: "FONT_FACE_SYM", text: "@font-face"},
|
{ name: "FONT_FACE_SYM", text: "@font-face"},
|
||||||
{ name: "CHARSET_SYM", text: "@charset"},
|
{ name: "CHARSET_SYM", text: "@charset"},
|
||||||
{ name: "NAMESPACE_SYM", text: "@namespace"},
|
{ name: "NAMESPACE_SYM", text: "@namespace"},
|
||||||
{ name: "VIEWPORT_SYM", text: "@viewport"},
|
{ name: "VIEWPORT_SYM", text: ["@viewport", "@-ms-viewport"]},
|
||||||
{ name: "UNKNOWN_SYM" },
|
{ name: "UNKNOWN_SYM" },
|
||||||
//{ name: "ATKEYWORD"},
|
//{ name: "ATKEYWORD"},
|
||||||
|
|
||||||
|
|
@ -6443,7 +6494,7 @@ var CSSLint = (function(){
|
||||||
embeddedRuleset = /\/\*csslint([^\*]*)\*\//,
|
embeddedRuleset = /\/\*csslint([^\*]*)\*\//,
|
||||||
api = new parserlib.util.EventTarget();
|
api = new parserlib.util.EventTarget();
|
||||||
|
|
||||||
api.version = "0.10.0";
|
api.version = "@VERSION@";
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// Rule Management
|
// Rule Management
|
||||||
|
|
@ -8941,13 +8992,14 @@ CSSLint.addFormatter({
|
||||||
output += filename + ": " + capitalize(message.type) + " - " + message.message + "\n";
|
output += filename + ": " + capitalize(message.type) + " - " + message.message + "\n";
|
||||||
} else {
|
} else {
|
||||||
output += filename + ": " + "line " + message.line +
|
output += filename + ": " + "line " + message.line +
|
||||||
", col " + message.col + ", " + capitalize(message.type) + " - " + message.message + "\n";
|
", col " + message.col + ", " + capitalize(message.type) + " - " + message.message + " (" + message.rule.id + ")\n";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/*global CSSLint*/
|
/*global CSSLint*/
|
||||||
CSSLint.addFormatter({
|
CSSLint.addFormatter({
|
||||||
//format information
|
//format information
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,8 @@ oop.inherits(Worker, Mirror);
|
||||||
|
|
||||||
this.onUpdate = function() {
|
this.onUpdate = function() {
|
||||||
var value = this.doc.getValue();
|
var value = this.doc.getValue();
|
||||||
|
if (!value)
|
||||||
|
return this.sender.emit("csslint", []);
|
||||||
var infoRules = this.infoRules;
|
var infoRules = this.infoRules;
|
||||||
|
|
||||||
var result = CSSLint.verify(value, this.ruleset);
|
var result = CSSLint.verify(value, this.ruleset);
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -30,49 +30,34 @@ var deps = {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
jshint: {
|
html5: {
|
||||||
path: "mode/javascript/jshint.js",
|
path: "mode/html/saxparser.js",
|
||||||
url: "http://jshint.com/get/jshint-2.1.9.js",
|
browserify: {
|
||||||
fetch: function(_, cb) {
|
npmModule: "git+https://github.com/aredridel/html5.git#master",
|
||||||
//run("npm install jshint@latest", function() {
|
path: "html5/lib/sax/SAXParser.js",
|
||||||
var base = Path.join(__dirname, "/node_modules/jshint/")
|
exports: "SAXParser"
|
||||||
var path = Path.join(base, "/src/stable/jshint")
|
|
||||||
run('browserify ' + path + ' -i console-browserify -r jshint', function(err, src) {
|
|
||||||
src = replaceConsoleBrowserify(src);
|
|
||||||
var version = JSON.parse(fs.readFileSync(base + "package.json")).version
|
|
||||||
src = [ "// " + version,
|
|
||||||
"var JSHINT;",
|
|
||||||
"(function () {",
|
|
||||||
"require = null;",
|
|
||||||
src,
|
|
||||||
"JSHINT = require('jshint').JSHINT;",
|
|
||||||
"}());"
|
|
||||||
].join("\n")
|
|
||||||
cb(err, src);
|
|
||||||
})
|
|
||||||
//});
|
|
||||||
},
|
},
|
||||||
|
fetch: browserify,
|
||||||
|
needsFixup: true,
|
||||||
|
postProcess: function(src) {
|
||||||
|
return src;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
jshint: {
|
||||||
|
path: "mode/javascript/jshint.js",
|
||||||
|
browserify: {
|
||||||
|
npmModule: "git+https://github.com/nightwing/jshint.git#master",
|
||||||
|
path: "jshint/src/jshint.js",
|
||||||
|
exports: "jshint"
|
||||||
|
},
|
||||||
|
fetch: browserify,
|
||||||
needsFixup: true,
|
needsFixup: true,
|
||||||
postProcess: function(src) {
|
postProcess: function(src) {
|
||||||
src = src.replace(/(\],|\{)((?:\d+|"\w+"):\[)/g, "$1\n$2")
|
|
||||||
.replace(/^(\},)(\{[^{}\[\]]*?\}\])/gm, "$1\n$2")
|
|
||||||
|
|
||||||
src = src.replace(
|
src = src.replace(
|
||||||
/"Expected a conditional expression and instead saw an assignment."/g,
|
/"Expected a conditional expression and instead saw an assignment."/g,
|
||||||
'"Assignment in conditional expression"'
|
'"Assignment in conditional expression"'
|
||||||
);
|
);
|
||||||
|
|
||||||
src = src.replace(/\brequire\(["']|\(require,|\(require\)/g, function(r){
|
|
||||||
return r.replace("require", "req");
|
|
||||||
})
|
|
||||||
|
|
||||||
src = src.replace(/var defaultMaxListeners = 10;/, function(a) {return a.replace("10", "200")});
|
src = src.replace(/var defaultMaxListeners = 10;/, function(a) {return a.replace("10", "200")});
|
||||||
|
|
||||||
src = src.replace(/var JSHINT;\s*\(function[\s()]+\{\s*/, "")
|
|
||||||
.replace(/JSHINT = .*\n\s*\}\(\)\);\s*/, "");
|
|
||||||
src += '\n'
|
|
||||||
+ 'function req() {return require.apply(this, arguments)}\n'
|
|
||||||
+ 'module.exports = req("jshint");\n';
|
|
||||||
return src;
|
return src;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -238,23 +223,26 @@ function unquote(str) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function replaceConsoleBrowserify(str) {
|
function browserify(_, cb) {
|
||||||
var simpleConsole = function(req,module,exports){
|
var br = this.browserify;
|
||||||
["log", "info", "warn", "error",
|
var path = Path.join("node_modules", br.path)
|
||||||
"time","timeEnd", "trace", "dir", "assert"
|
run("npm install " + this.browserify.npmModule, function() {
|
||||||
].forEach(function(x) {exports[x] = nop;});
|
run("browserify " + path + " -s " + br.exports, function(err, src) {
|
||||||
function nop() {}
|
src = src.replace(/^.*return\s*\(function/, "module.exports = (function")
|
||||||
}
|
.replace(/\}\);\s*$/, "");
|
||||||
var m = /"console-browserify":(\d+)/.exec(str);
|
src = src.replace(/(\],|\{)((?:\d+|"\w+"):\[)/g, "$1\n$2")
|
||||||
name = m && m[1];
|
.replace(/^(\},)(\{[^{}\[\]]*?\}\])/gm, "$1\n$2")
|
||||||
if (name) {
|
cb(err, src);
|
||||||
str = str.replace(
|
})
|
||||||
"{1:[",
|
})
|
||||||
"{" + name + ":[" + simpleConsole + ",{}],\n1:["
|
|
||||||
)
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var args = process.argv.slice(2);
|
||||||
|
args = args.filter(function(x) {return x[0] != "-" });
|
||||||
|
if (!args.length)
|
||||||
|
args = Object.keys(deps);
|
||||||
|
|
||||||
|
args.forEach(function(key) {
|
||||||
|
getDep(deps[key])
|
||||||
|
});
|
||||||
|
|
||||||
getDep(deps.jshint)
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue