Merge pull request #1885 from ajaxorg/update_deps

update saxparser and jshint
This commit is contained in:
Lennart Kats 2014-04-01 12:11:43 +02:00
commit bb10f4661d
7 changed files with 10568 additions and 11000 deletions

View file

@ -1,5 +1,5 @@
/** 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.
* see: http://github.com/jrburke/requirejs for details
*/
@ -12,7 +12,7 @@ var requirejs, require, define;
(function (global) {
var req, s, head, baseElement, dataMain, src,
interactiveScript, currentlyAddingScript, mainScript, subPath,
version = '2.1.9+',
version = '2.1.11+',
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
jsSuffixRegExp = /\.js$/,
@ -108,7 +108,10 @@ var requirejs, require, define;
if (source) {
eachProp(source, function (value, 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]) {
target[prop] = {};
}
@ -138,7 +141,7 @@ var requirejs, require, define;
throw err;
}
//Allow getting a global that expressed in
//Allow getting a global that is expressed in
//dot notation, like 'a.b.c'.
function getGlobal(value) {
if (!value) {
@ -177,7 +180,7 @@ var requirejs, require, define;
if (typeof requirejs !== 'undefined') {
if (isFunction(requirejs)) {
//Do not overwrite and existing requirejs instance.
//Do not overwrite an existing requirejs instance.
return;
}
cfg = requirejs;
@ -201,6 +204,7 @@ var requirejs, require, define;
waitSeconds: 7,
baseUrl: './',
paths: {},
bundles: {},
pkgs: {},
shim: {},
config: {}
@ -214,6 +218,7 @@ var requirejs, require, define;
defQueue = [],
defined = {},
urlFetched = {},
bundlesMap = {},
requireCounter = 1,
unnormalizedCounter = 1;
@ -227,8 +232,8 @@ var requirejs, require, define;
* @param {Array} ary the array of path segments.
*/
function trimDots(ary) {
var i, part;
for (i = 0; ary[i]; i += 1) {
var i, part, length = ary.length;
for (i = 0; i < length; i++) {
part = ary[i];
if (part === '.') {
ary.splice(i, 1);
@ -261,7 +266,7 @@ var requirejs, require, define;
* @returns {String} normalized name
*/
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,
baseParts = baseName && baseName.split('/'),
normalizedBaseParts = baseParts,
@ -274,29 +279,26 @@ var requirejs, require, define;
//otherwise, assume it is a top-level require that will
//be relative to baseUrl in the end.
if (baseName) {
if (getOwn(config.pkgs, baseName)) {
//If the baseName is a package name, then just treat it as one
//name to concat the name with.
normalizedBaseParts = baseParts = [baseName];
} else {
//Convert baseName to array, and lop off the last part,
//so that . matches that 'directory' and not name of the baseName's
//module. For instance, baseName of 'one/two/three', maps to
//'one/two/three.js', but we want the directory, 'one/two' for
//this normalization.
normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
//Convert baseName to array, and lop off the last part,
//so that . matches that 'directory' and not name of the baseName's
//module. For instance, baseName of 'one/two/three', maps to
//'one/two/three.js', but we want the directory, 'one/two' for
//this normalization.
normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
name = name.split('/');
lastIndex = name.length - 1;
// If wanting node ID compatibility, strip .js from end
// 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);
//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('/');
if (pkgConfig && name === pkgName + '/' + pkgConfig.main) {
name = pkgName;
}
} else if (name.indexOf('./') === 0) {
// No baseName, so this is ID is resolved relative
// to baseUrl, pull off the leading dot.
@ -308,7 +310,7 @@ var requirejs, require, define;
if (applyMap && map && (baseParts || starMap)) {
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('/');
if (baseParts) {
@ -325,16 +327,12 @@ var requirejs, require, define;
//Match, update name to the new value.
foundMap = mapValue;
foundI = i;
break;
break outerLoop;
}
}
}
}
if (foundMap) {
break;
}
//Check for a star map match, but just hold on to it,
//if there is a shorter segment match later in a matching
//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) {
@ -377,7 +379,13 @@ var requirejs, require, define;
//retry
pathConfig.shift();
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;
}
}
@ -565,7 +573,7 @@ var requirejs, require, define;
mod.usingExports = true;
if (mod.map.isDefine) {
if (mod.exports) {
return mod.exports;
return (defined[mod.map.id] = mod.exports);
} else {
return (mod.exports = defined[mod.map.id] = {});
}
@ -579,15 +587,9 @@ var requirejs, require, define;
id: mod.map.id,
uri: mod.map.url,
config: function () {
var c,
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 || {};
return getOwn(config.config, mod.map.id) || {};
},
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);
}
if (this.map.isDefine) {
//If setting exports via 'module' is in play,
//favor that over return value and exports. After that,
//favor a non-undefined return value over exports use.
// Favor return value over exports. If node/cjs in play,
// then will not have a return value anyway. Favor
// module.exports assignment over exports object.
if (this.map.isDefine && exports === undefined) {
cjsModule = this.module;
if (cjsModule &&
cjsModule.exports !== undefined &&
//Make sure it is not already the exports value
cjsModule.exports !== this.exports) {
if (cjsModule) {
exports = cjsModule.exports;
} else if (exports === undefined && this.usingExports) {
} else if (this.usingExports) {
//exports already set the defined value.
exports = this.exports;
}
@ -940,6 +939,7 @@ var requirejs, require, define;
on(pluginMap, 'defined', bind(this, function (plugin) {
var load, normalizedMap, normalizedMod,
bundleId = getOwn(bundlesMap, this.map.id),
name = this.map.name,
parentName = this.map.parentMap ? this.map.parentMap.name : null,
localRequire = context.makeRequire(map.parentMap, {
@ -985,6 +985,14 @@ var requirejs, require, define;
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) {
this.init([], function () { return value; }, null, {
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.
var pkgs = config.pkgs,
shim = config.shim,
var shim = config.shim,
objs = {
paths: true,
bundles: true,
config: true,
map: true
};
eachProp(cfg, function (value, prop) {
if (objs[prop]) {
if (prop === 'map') {
if (!config.map) {
config.map = {};
}
mixin(config[prop], value, true, true);
} else {
mixin(config[prop], value, true);
if (!config[prop]) {
config[prop] = {};
}
mixin(config[prop], value, true, true);
} else {
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
if (cfg.shim) {
eachProp(cfg.shim, function (value, id) {
@ -1294,29 +1309,25 @@ var requirejs, require, define;
//Adjust packages if necessary.
if (cfg.packages) {
each(cfg.packages, function (pkgObj) {
var location;
var location, name;
pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj;
name = pkgObj.name;
location = pkgObj.location;
if (location) {
config.paths[name] = pkgObj.location;
}
//Create a brand new object on pkgs, since currentPackages can
//be passed in again, and config.pkgs is the internal transformed
//state for all package configs.
pkgs[pkgObj.name] = {
name: pkgObj.name,
location: location || pkgObj.name,
//Remove leading dot in main, so main paths are normalized,
//and remove any trailing .js, since different package
//envs have different conventions: some use a module name,
//some use a file name.
main: (pkgObj.main || 'main')
.replace(currDirRegExp, '')
.replace(jsSuffixRegExp, '')
};
//Save pointer to main module ID for pkg name.
//Remove leading dot in main, so main paths are normalized,
//and remove any trailing .js, since different package
//envs have different conventions: some use a module name,
//some use a file name.
config.pkgs[name] = pkgObj.name + '/' + (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,
@ -1497,7 +1508,7 @@ var requirejs, require, define;
/**
* Called to enable a module if it is still in the registry
* 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.
*/
enable: function (depMap) {
@ -1571,8 +1582,19 @@ var requirejs, require, define;
* internal API, not a public one. Use toUrl for the public API.
*/
nameToUrl: function (moduleName, ext, skipExt) {
var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url,
parentPath;
var paths, syms, i, parentModule, url,
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
//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 {
//A module that needs to be converted to a path.
paths = config.paths;
pkgs = config.pkgs;
syms = moduleName.split('/');
//For each module name segment, see if there is a path
@ -1594,7 +1615,7 @@ var requirejs, require, define;
//and work up from it.
for (i = syms.length; i > 0; i -= 1) {
parentModule = syms.slice(0, i).join('/');
pkg = getOwn(pkgs, parentModule);
parentPath = getOwn(paths, parentModule);
if (parentPath) {
//If an array, it means there are a few choices,
@ -1604,16 +1625,6 @@ var requirejs, require, define;
}
syms.splice(0, i, parentPath);
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;
}
}

View file

@ -368,6 +368,7 @@ exports.runEmmetCommand = function(editor) {
} catch(e) {
editor._signal("changeStatus", typeof e == "string" ? e : e.message);
console.log(e);
result = false
}
return result;
};

View file

@ -1,7 +1,7 @@
define(function(require, exports, module) {
/*!
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
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.
*/
/* Build: v0.10.0 15-August-2013 01:07:22 */
/* Build: v0.10.0 31-March-2014 08:16:48 */
/*!
Parser-Lib
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.
*/
/* 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 = {};
(function(){
@ -956,7 +956,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
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(){
var EventTarget = parserlib.util.EventTarget,
TokenStreamBase = parserlib.util.TokenStreamBase,
@ -991,6 +991,7 @@ var Colors = {
darkcyan :"#008b8b",
darkgoldenrod :"#b8860b",
darkgray :"#a9a9a9",
darkgrey :"#a9a9a9",
darkgreen :"#006400",
darkkhaki :"#bdb76b",
darkmagenta :"#8b008b",
@ -1002,11 +1003,13 @@ var Colors = {
darkseagreen :"#8fbc8f",
darkslateblue :"#483d8b",
darkslategray :"#2f4f4f",
darkslategrey :"#2f4f4f",
darkturquoise :"#00ced1",
darkviolet :"#9400d3",
deeppink :"#ff1493",
deepskyblue :"#00bfff",
dimgray :"#696969",
dimgrey :"#696969",
dodgerblue :"#1e90ff",
firebrick :"#b22222",
floralwhite :"#fffaf0",
@ -1017,6 +1020,7 @@ var Colors = {
gold :"#ffd700",
goldenrod :"#daa520",
gray :"#808080",
grey :"#808080",
green :"#008000",
greenyellow :"#adff2f",
honeydew :"#f0fff0",
@ -1034,12 +1038,14 @@ var Colors = {
lightcyan :"#e0ffff",
lightgoldenrodyellow :"#fafad2",
lightgray :"#d3d3d3",
lightgrey :"#d3d3d3",
lightgreen :"#90ee90",
lightpink :"#ffb6c1",
lightsalmon :"#ffa07a",
lightseagreen :"#20b2aa",
lightskyblue :"#87cefa",
lightslategray :"#778899",
lightslategrey :"#778899",
lightsteelblue :"#b0c4de",
lightyellow :"#ffffe0",
lime :"#00ff00",
@ -1092,6 +1098,7 @@ var Colors = {
skyblue :"#87ceeb",
slateblue :"#6a5acd",
slategray :"#708090",
slategrey :"#708090",
snow :"#fffafa",
springgreen :"#00ff7f",
steelblue :"#4682b4",
@ -1117,6 +1124,7 @@ var Colors = {
buttontext :"Text on push buttons.",
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.",
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.",
highlighttext :"Text of item(s) selected in a control.",
inactiveborder :"Inactive window border.",
@ -3533,6 +3541,12 @@ nth
var Properties = {
//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-baseline" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
"animation" : 1,
@ -3728,15 +3742,24 @@ var Properties = {
"border-top-width" : "<border-width>",
"border-width" : { multi: "<border-width>", max: 4 },
"bottom" : "<margin-width> | inherit",
"box-align" : "start | end | center | baseline | stretch", //http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/
"box-decoration-break" : "slice |clone",
"box-direction" : "normal | reverse | inherit",
"box-flex" : "<number>",
"box-flex-group" : "<integer>",
"box-lines" : "single | multiple",
"box-ordinal-group" : "<integer>",
"box-orient" : "horizontal | vertical | inline-axis | block-axis | inherit",
"box-pack" : "start | end | center | justify",
"-moz-box-align" : "start | end | center | baseline | stretch",
"-moz-box-decoration-break" : "slice |clone",
"-moz-box-direction" : "normal | reverse | inherit",
"-moz-box-flex" : "<number>",
"-moz-box-flex-group" : "<integer>",
"-moz-box-lines" : "single | multiple",
"-moz-box-ordinal-group" : "<integer>",
"-moz-box-orient" : "horizontal | vertical | inline-axis | block-axis | inherit",
"-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) {
var result = false,
part;
@ -3782,7 +3805,7 @@ var Properties = {
//D
"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,
"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",
@ -3799,6 +3822,26 @@ var Properties = {
"filter" : 1,
"fit" : "fill | hidden | meet | slice",
"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-offset" : 1,
"font" : 1,
@ -3842,6 +3885,10 @@ var Properties = {
"image-resolution" : 1,
"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
"left" : "<margin-width> | inherit",
"letter-spacing" : "<length> | normal | inherit",
@ -3885,6 +3932,8 @@ var Properties = {
//O
"opacity" : "<number> | inherit",
"order" : "<integer>",
"-webkit-order" : "<integer>",
"orphans" : "<integer> | inherit",
"outline" : 1,
"outline-color" : "<color> | invert | inherit",
@ -3893,6 +3942,7 @@ var Properties = {
"outline-width" : "<border-width> | inherit",
"overflow" : "visible | hidden | scroll | auto | inherit",
"overflow-style" : 1,
"overflow-wrap" : "normal | break-word",
"overflow-x" : 1,
"overflow-y" : 1,
@ -3970,6 +4020,8 @@ var Properties = {
"text-transform" : "capitalize | uppercase | lowercase | none | inherit",
"text-wrap" : "normal | none | avoid",
"top" : "<margin-width> | inherit",
"-ms-touch-action" : "auto | none | pan-x | pan-y",
"touch-action" : "auto | none | pan-x | pan-y",
"transform" : 1,
"transform-origin" : 1,
"transform-style" : 1,
@ -3980,7 +4032,7 @@ var Properties = {
"transition-timing-function" : 1,
//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-select" : "none | text | toggle | element | elements | all | inherit",
@ -4004,7 +4056,8 @@ var Properties = {
"width" : "<length> | <percentage> | auto | inherit" ,
"word-break" : "normal | keep-all | break-all",
"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-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
this.type = "percentage";
this.value = +RegExp.$1;
@ -4374,6 +4424,7 @@ PropertyValuePart.prototype.constructor = PropertyValuePart;
PropertyValuePart.fromToken = function(token){
return new PropertyValuePart(token.value, token.startLine, token.startCol);
};
var Pseudos = {
":first-letter": 1,
":first-line": 1,
@ -5661,7 +5712,7 @@ var Tokens = [
{ name: "FONT_FACE_SYM", text: "@font-face"},
{ name: "CHARSET_SYM", text: "@charset"},
{ name: "NAMESPACE_SYM", text: "@namespace"},
{ name: "VIEWPORT_SYM", text: "@viewport"},
{ name: "VIEWPORT_SYM", text: ["@viewport", "@-ms-viewport"]},
{ name: "UNKNOWN_SYM" },
//{ name: "ATKEYWORD"},
@ -6443,7 +6494,7 @@ var CSSLint = (function(){
embeddedRuleset = /\/\*csslint([^\*]*)\*\//,
api = new parserlib.util.EventTarget();
api.version = "0.10.0";
api.version = "@VERSION@";
//-------------------------------------------------------------------------
// Rule Management
@ -8941,13 +8992,14 @@ CSSLint.addFormatter({
output += filename + ": " + capitalize(message.type) + " - " + message.message + "\n";
} else {
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;
}
});
/*global CSSLint*/
CSSLint.addFormatter({
//format information

View file

@ -76,6 +76,8 @@ oop.inherits(Worker, Mirror);
this.onUpdate = function() {
var value = this.doc.getValue();
if (!value)
return this.sender.emit("csslint", []);
var infoRules = this.infoRules;
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

View file

@ -30,49 +30,34 @@ var deps = {
)
}
},
jshint: {
path: "mode/javascript/jshint.js",
url: "http://jshint.com/get/jshint-2.1.9.js",
fetch: function(_, cb) {
//run("npm install jshint@latest", function() {
var base = Path.join(__dirname, "/node_modules/jshint/")
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);
})
//});
html5: {
path: "mode/html/saxparser.js",
browserify: {
npmModule: "git+https://github.com/aredridel/html5.git#master",
path: "html5/lib/sax/SAXParser.js",
exports: "SAXParser"
},
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,
postProcess: function(src) {
src = src.replace(/(\],|\{)((?:\d+|"\w+"):\[)/g, "$1\n$2")
.replace(/^(\},)(\{[^{}\[\]]*?\}\])/gm, "$1\n$2")
src = src.replace(
/"Expected a conditional expression and instead saw an assignment."/g,
'"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 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;
}
},
@ -238,23 +223,26 @@ function unquote(str) {
});
}
function replaceConsoleBrowserify(str) {
var simpleConsole = function(req,module,exports){
["log", "info", "warn", "error",
"time","timeEnd", "trace", "dir", "assert"
].forEach(function(x) {exports[x] = nop;});
function nop() {}
}
var m = /"console-browserify":(\d+)/.exec(str);
name = m && m[1];
if (name) {
str = str.replace(
"{1:[",
"{" + name + ":[" + simpleConsole + ",{}],\n1:["
)
}
return str;
function browserify(_, cb) {
var br = this.browserify;
var path = Path.join("node_modules", br.path)
run("npm install " + this.browserify.npmModule, function() {
run("browserify " + path + " -s " + br.exports, function(err, src) {
src = src.replace(/^.*return\s*\(function/, "module.exports = (function")
.replace(/\}\);\s*$/, "");
src = src.replace(/(\],|\{)((?:\d+|"\w+"):\[)/g, "$1\n$2")
.replace(/^(\},)(\{[^{}\[\]]*?\}\])/gm, "$1\n$2")
cb(err, src);
})
})
}
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)