--
This commit is contained in:
parent
24f3d27984
commit
6b60015c02
9588 changed files with 1149251 additions and 49 deletions
11
node_modules/accord/.editorconfig
generated
vendored
Normal file
11
node_modules/accord/.editorconfig
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# This file is for unifying the coding style for different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
8
node_modules/accord/.npmignore
generated
vendored
Normal file
8
node_modules/accord/.npmignore
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
test
|
||||
src
|
||||
.travis.yml
|
||||
Makefile
|
||||
docs
|
||||
coverage
|
||||
yarn.lock
|
||||
polytest_*
|
||||
20
node_modules/accord/contributing.md
generated
vendored
Normal file
20
node_modules/accord/contributing.md
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
Contributing
|
||||
------------
|
||||
|
||||
Anything that people should know before filing issues or opening pull requests should be here. This is a good place to put details on coding conventions, how to build the project, and how to run tests.
|
||||
|
||||
### Filing Issues
|
||||
|
||||
If you have found an issue with this library, please let us know! Make sure that before you file an issue, you have searched to see if someone else has already opened it. When opening the issue, make sure there's a clear and concise title and description, and that the description contains specific steps that can be followed to reproduce the issue you are experiencing. Following these guidelines will get your issue fixed up the quickest!
|
||||
|
||||
If you are making a feature request, that is welcome in the issues section as well. Make sure again that the title and issue summary are clear so that we can understand what you're asking for. Any use cases would also help. And if you are requesting a feature and are able to work with javscript code, please consider submitting a pull request for the feature!
|
||||
|
||||
### Pull Requests
|
||||
|
||||
When submitting a pull request, make sure that the code follows the general style and structure elsewhere in the library, that your commit messages are [well-formed](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), and that you have added tests for whatever feature you are adding.
|
||||
|
||||
### Running Tests
|
||||
|
||||
To run tests, make sure you have `npm install`ed, then just run `mocha` in the root. If you'd like to run tests just for one specific adapter, you can use mocha's grep option, like this `mocha -g jade` - this would run just the jade test suite.
|
||||
|
||||
The way tests are set up is fairly simple, a folder in `fixtures` and a `describe` block for each adapter. All tests are currently compared to expected output through an pure javascript AST, to ensure compatibility across systems.
|
||||
278
node_modules/accord/lib/adapter_base.js
generated
vendored
Normal file
278
node_modules/accord/lib/adapter_base.js
generated
vendored
Normal file
|
|
@ -0,0 +1,278 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, W, clone, fs, partialRight, path, readFile, requireEngine, resolve, resolvePath,
|
||||
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||
|
||||
W = require('when');
|
||||
|
||||
clone = require('lodash.clone');
|
||||
|
||||
partialRight = require('lodash.partialright');
|
||||
|
||||
resolve = require('resolve');
|
||||
|
||||
path = require('path');
|
||||
|
||||
fs = require('fs');
|
||||
|
||||
readFile = require('when/node/function').lift(fs.readFile);
|
||||
|
||||
Adapter = (function() {
|
||||
|
||||
/**
|
||||
* The names of the npm modules that are supported to be used as engines by
|
||||
the adapter. Defaults to the name of the adapter.
|
||||
* @type {String[]}
|
||||
*/
|
||||
Adapter.prototype.supportedEngines = void 0;
|
||||
|
||||
|
||||
/**
|
||||
* The name of the engine in-use. Generally this is the name of the package on
|
||||
npm.
|
||||
* @type {String}
|
||||
*/
|
||||
|
||||
Adapter.prototype.engineName = '';
|
||||
|
||||
|
||||
/**
|
||||
* The actual engine, no adapter wrapper. Defaults to the engine that we
|
||||
recommend for compiling that particular language (if it is installed).
|
||||
Otherwise, whatever engine we support that is installed.
|
||||
*/
|
||||
|
||||
Adapter.prototype.engine = void 0;
|
||||
|
||||
|
||||
/**
|
||||
* Array of all file extensions the compiler should match
|
||||
* @type {String[]}
|
||||
*/
|
||||
|
||||
Adapter.prototype.extensions = void 0;
|
||||
|
||||
|
||||
/**
|
||||
* Expected output extension
|
||||
* @type {String}
|
||||
*/
|
||||
|
||||
Adapter.prototype.output = '';
|
||||
|
||||
|
||||
/**
|
||||
* Specify if the output of the language is independent of other files or the
|
||||
evaluation of potentially stateful functions. This means that the only
|
||||
information passed into the engine is what gets passed to Accord's
|
||||
compile/render function, and whenever that same input is given, the output
|
||||
will always be the same.
|
||||
* @type {Boolean}
|
||||
* @todo Add detection for when a particular job qualifies as isolated
|
||||
*/
|
||||
|
||||
Adapter.prototype.isolated = false;
|
||||
|
||||
|
||||
/**
|
||||
* @param {String} [engine=Adapter.supportedEngines[0]] If you need to use a
|
||||
particular engine to compile/render with, then specify it here. Otherwise
|
||||
we use whatever engine you have installed.
|
||||
*/
|
||||
|
||||
function Adapter(engineName1, customPath) {
|
||||
var i, len, ref, ref1;
|
||||
this.engineName = engineName1;
|
||||
if (!this.supportedEngines || this.supportedEngines.length === 0) {
|
||||
this.supportedEngines = [this.name];
|
||||
}
|
||||
if (this.engineName != null) {
|
||||
if (ref = this.engineName, indexOf.call(this.supportedEngines, ref) < 0) {
|
||||
throw new Error("engine '" + this.engineName + "' not supported");
|
||||
}
|
||||
this.engine = requireEngine(this.engineName, customPath);
|
||||
} else {
|
||||
ref1 = this.supportedEngines;
|
||||
for (i = 0, len = ref1.length; i < len; i++) {
|
||||
this.engineName = ref1[i];
|
||||
try {
|
||||
this.engine = requireEngine(this.engineName, customPath);
|
||||
} catch (error) {
|
||||
continue;
|
||||
}
|
||||
return;
|
||||
}
|
||||
throw new Error("'tried to require: " + this.supportedEngines + "'.\nNone found. Make sure one has been installed!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render a string to a compiled string
|
||||
* @param {String} str
|
||||
* @param {Object} [opts = {}]
|
||||
* @return {Promise}
|
||||
*/
|
||||
|
||||
Adapter.prototype.render = function(str, opts) {
|
||||
if (opts == null) {
|
||||
opts = {};
|
||||
}
|
||||
if (!this._render) {
|
||||
return W.reject(new Error('render not supported'));
|
||||
}
|
||||
return this._render(str, opts);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Render a file to a compiled string
|
||||
* @param {String} file The path to the file
|
||||
* @param {Object} [opts = {}]
|
||||
* @return {Promise}
|
||||
*/
|
||||
|
||||
Adapter.prototype.renderFile = function(file, opts) {
|
||||
if (opts == null) {
|
||||
opts = {};
|
||||
}
|
||||
opts = clone(opts, true);
|
||||
return readFile(file, 'utf8').then(partialRight(this.render, Object.assign({
|
||||
filename: file
|
||||
}, opts)).bind(this));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Compile a string to a function
|
||||
* @param {String} str
|
||||
* @param {Object} [opts = {}]
|
||||
* @return {Promise}
|
||||
*/
|
||||
|
||||
Adapter.prototype.compile = function(str, opts) {
|
||||
if (opts == null) {
|
||||
opts = {};
|
||||
}
|
||||
if (!this._compile) {
|
||||
return W.reject(new Error('compile not supported'));
|
||||
}
|
||||
return this._compile(str, opts);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Compile a file to a function
|
||||
* @param {String} file The path to the file
|
||||
* @param {Object} [opts = {}]
|
||||
* @return {Promise}
|
||||
*/
|
||||
|
||||
Adapter.prototype.compileFile = function(file, opts) {
|
||||
if (opts == null) {
|
||||
opts = {};
|
||||
}
|
||||
return readFile(file, 'utf8').then(partialRight(this.compile, Object.assign({
|
||||
filename: file
|
||||
}, opts)).bind(this));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Compile a string to a client-side-ready function
|
||||
* @param {String} str
|
||||
* @param {Object} [opts = {}]
|
||||
* @return {Promise}
|
||||
*/
|
||||
|
||||
Adapter.prototype.compileClient = function(str, opts) {
|
||||
if (opts == null) {
|
||||
opts = {};
|
||||
}
|
||||
if (!this._compileClient) {
|
||||
return W.reject(new Error('client-side compile not supported'));
|
||||
}
|
||||
return this._compileClient(str, opts);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Compile a file to a client-side-ready function
|
||||
* @param {String} file The path to the file
|
||||
* @param {Object} [opts = {}]
|
||||
* @return {Promise}
|
||||
*/
|
||||
|
||||
Adapter.prototype.compileFileClient = function(file, opts) {
|
||||
if (opts == null) {
|
||||
opts = {};
|
||||
}
|
||||
return readFile(file, 'utf8').then(partialRight(this.compileClient, Object.assign(opts, {
|
||||
filename: file
|
||||
})).bind(this));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Some adapters that compile for client also need helpers, this method
|
||||
returns a string of minfied JavaScript with all of them
|
||||
* @return {Promise} A promise for the client-side helpers.
|
||||
*/
|
||||
|
||||
Adapter.prototype.clientHelpers = void 0;
|
||||
|
||||
return Adapter;
|
||||
|
||||
})();
|
||||
|
||||
requireEngine = function(engineName, customPath) {
|
||||
var engine, err;
|
||||
if (customPath != null) {
|
||||
engine = require(resolve.sync(path.basename(customPath), {
|
||||
basedir: customPath
|
||||
}));
|
||||
engine.__accord_path = customPath;
|
||||
} else {
|
||||
try {
|
||||
engine = require(engineName);
|
||||
engine.__accord_path = resolvePath(engineName);
|
||||
} catch (error) {
|
||||
err = error;
|
||||
throw new Error("'" + engineName + "' not found. make sure it has been installed!");
|
||||
}
|
||||
}
|
||||
try {
|
||||
if (!engine.version) {
|
||||
engine.version = require(engine.__accord_path + '/package.json').version;
|
||||
}
|
||||
} catch (error) {
|
||||
err = error;
|
||||
}
|
||||
return engine;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get the path to the root folder of a node module, given its name.
|
||||
* @param {String} name The name of the node module you want the path to.
|
||||
* @return {String} The root folder of node module `name`.
|
||||
* @private
|
||||
*/
|
||||
|
||||
resolvePath = function(name) {
|
||||
var filepath;
|
||||
filepath = require.resolve(name);
|
||||
while (true) {
|
||||
if (filepath === '/') {
|
||||
throw new Error("cannot resolve root of node module " + name);
|
||||
}
|
||||
filepath = path.dirname(filepath);
|
||||
if (fs.existsSync(path.join(filepath, 'package.json'))) {
|
||||
return filepath;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = Adapter;
|
||||
|
||||
}).call(this);
|
||||
55
node_modules/accord/lib/adapters/LiveScript/1.x.js
generated
vendored
Normal file
55
node_modules/accord/lib/adapters/LiveScript/1.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, LiveScript, W,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
LiveScript = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(LiveScript, superClass);
|
||||
|
||||
function LiveScript() {
|
||||
return LiveScript.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
LiveScript.prototype.name = 'LiveScript';
|
||||
|
||||
LiveScript.prototype.extensions = ['ls'];
|
||||
|
||||
LiveScript.prototype.output = 'js';
|
||||
|
||||
LiveScript.prototype.isolated = true;
|
||||
|
||||
LiveScript.prototype._render = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return LiveScript;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = LiveScript;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/LiveScript/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/LiveScript/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./1.x');
|
||||
|
||||
}).call(this);
|
||||
74
node_modules/accord/lib/adapters/babel/4.x - 5.x.js
generated
vendored
Normal file
74
node_modules/accord/lib/adapters/babel/4.x - 5.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Babel, W, path, sourcemaps,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
path = require('path');
|
||||
|
||||
W = require('when');
|
||||
|
||||
sourcemaps = require('../../sourcemaps');
|
||||
|
||||
Babel = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(Babel, superClass);
|
||||
|
||||
function Babel() {
|
||||
return Babel.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Babel.prototype.name = 'babel';
|
||||
|
||||
Babel.prototype.extensions = ['jsx', 'js'];
|
||||
|
||||
Babel.prototype.output = 'js';
|
||||
|
||||
Babel.prototype.isolated = true;
|
||||
|
||||
Babel.prototype._render = function(str, options) {
|
||||
var filename;
|
||||
filename = options.filename;
|
||||
if (options.sourcemap === true) {
|
||||
options.sourceMap = true;
|
||||
}
|
||||
options.sourceMapName = filename;
|
||||
delete options.sourcemap;
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.transform(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var data, err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
data = {
|
||||
result: res.code
|
||||
};
|
||||
if (res.map) {
|
||||
return sourcemaps.inline_sources(res.map).then(function(map) {
|
||||
data.sourcemap = map;
|
||||
return data;
|
||||
});
|
||||
} else {
|
||||
return W.resolve(data);
|
||||
}
|
||||
};
|
||||
|
||||
return Babel;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Babel;
|
||||
|
||||
}).call(this);
|
||||
86
node_modules/accord/lib/adapters/babel/6.x.js
generated
vendored
Normal file
86
node_modules/accord/lib/adapters/babel/6.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Babel, W, path, pick, sourcemaps,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
path = require('path');
|
||||
|
||||
W = require('when');
|
||||
|
||||
pick = require('lodash.pick');
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
sourcemaps = require('../../sourcemaps');
|
||||
|
||||
Babel = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(Babel, superClass);
|
||||
|
||||
function Babel() {
|
||||
return Babel.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Babel.prototype.name = 'babel';
|
||||
|
||||
Babel.prototype.extensions = ['js', 'jsx'];
|
||||
|
||||
Babel.prototype.output = 'js';
|
||||
|
||||
Babel.prototype.isolated = true;
|
||||
|
||||
Babel.prototype.supportedEngines = ['babel-core'];
|
||||
|
||||
Babel.prototype._render = function(str, options) {
|
||||
var allowed_keys, filename, sanitized_options;
|
||||
filename = options.filename;
|
||||
if (options.sourcemap === true) {
|
||||
options.sourceMaps = true;
|
||||
}
|
||||
options.sourceFileName = filename;
|
||||
delete options.sourcemap;
|
||||
allowed_keys = ['filename', 'filenameRelative', 'presets', 'plugins', 'highlightCode', 'only', 'ignore', 'auxiliaryCommentBefore', 'auxiliaryCommentAfter', 'sourceMaps', 'inputSourceMap', 'sourceMapTarget', 'sourceRoot', 'moduleRoot', 'moduleIds', 'moduleId', 'getModuleId', 'resolveModuleSource', 'code', 'babelrc', 'ast', 'compact', 'comments', 'shouldPrintComment', 'env', 'retainLines', 'extends'];
|
||||
sanitized_options = pick(options, allowed_keys);
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.transform(str, sanitized_options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var data, dirname, err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
data = {
|
||||
result: res.code
|
||||
};
|
||||
if (res.map) {
|
||||
if (res.map.sources) {
|
||||
dirname = path.dirname(res.options.filename);
|
||||
res.map.sources = res.map.sources.map(function(source) {
|
||||
return path.join(dirname, source);
|
||||
});
|
||||
}
|
||||
return sourcemaps.inline_sources(res.map).then(function(map) {
|
||||
data.sourcemap = map;
|
||||
return data;
|
||||
});
|
||||
} else {
|
||||
return W.resolve(data);
|
||||
}
|
||||
};
|
||||
|
||||
return Babel;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Babel;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/babel/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/babel/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./6.x');
|
||||
|
||||
}).call(this);
|
||||
68
node_modules/accord/lib/adapters/buble/0.8.x - 0.14.x.js
generated
vendored
Normal file
68
node_modules/accord/lib/adapters/buble/0.8.x - 0.14.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Buble, W, path, sourcemaps,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
path = require('path');
|
||||
|
||||
W = require('when');
|
||||
|
||||
sourcemaps = require('../../sourcemaps');
|
||||
|
||||
Buble = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(Buble, superClass);
|
||||
|
||||
function Buble() {
|
||||
return Buble.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Buble.prototype.name = 'buble';
|
||||
|
||||
Buble.prototype.extensions = ['js'];
|
||||
|
||||
Buble.prototype.output = 'js';
|
||||
|
||||
Buble.prototype.isolated = true;
|
||||
|
||||
Buble.prototype._render = function(str, options) {
|
||||
options.source = options.filename;
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.transform(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var data, err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
data = {
|
||||
result: res.code
|
||||
};
|
||||
if (res.map) {
|
||||
return sourcemaps.inline_sources(res.map).then(function(map) {
|
||||
data.sourcemap = map;
|
||||
return data;
|
||||
});
|
||||
} else {
|
||||
return W.resolve(data);
|
||||
}
|
||||
};
|
||||
|
||||
return Buble;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Buble;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/buble/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/buble/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./0.8.x - 0.14.x');
|
||||
|
||||
}).call(this);
|
||||
63
node_modules/accord/lib/adapters/cjsx/3.x.js
generated
vendored
Normal file
63
node_modules/accord/lib/adapters/cjsx/3.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, CJSX, W, path, sourcemaps,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
sourcemaps = require('../../sourcemaps');
|
||||
|
||||
path = require('path');
|
||||
|
||||
W = require('when');
|
||||
|
||||
CJSX = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(CJSX, superClass);
|
||||
|
||||
function CJSX() {
|
||||
return CJSX.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
CJSX.prototype.name = 'cjsx';
|
||||
|
||||
CJSX.prototype.extensions = ['cjsx'];
|
||||
|
||||
CJSX.prototype.output = 'coffee';
|
||||
|
||||
CJSX.prototype.supportedEngines = ['coffee-react-transform'];
|
||||
|
||||
CJSX.prototype.isolated = true;
|
||||
|
||||
CJSX.prototype._render = function(str, options) {
|
||||
var filename;
|
||||
filename = options.filename;
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine(str);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return CJSX;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = CJSX;
|
||||
|
||||
}).call(this);
|
||||
63
node_modules/accord/lib/adapters/cjsx/4.x - 5.x.js
generated
vendored
Normal file
63
node_modules/accord/lib/adapters/cjsx/4.x - 5.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, CJSX, W, path, sourcemaps,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
sourcemaps = require('../../sourcemaps');
|
||||
|
||||
path = require('path');
|
||||
|
||||
W = require('when');
|
||||
|
||||
CJSX = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(CJSX, superClass);
|
||||
|
||||
function CJSX() {
|
||||
return CJSX.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
CJSX.prototype.name = 'cjsx';
|
||||
|
||||
CJSX.prototype.extensions = ['cjsx'];
|
||||
|
||||
CJSX.prototype.output = 'coffee';
|
||||
|
||||
CJSX.prototype.supportedEngines = ['coffee-react-transform'];
|
||||
|
||||
CJSX.prototype.isolated = true;
|
||||
|
||||
CJSX.prototype._render = function(str, options) {
|
||||
var filename;
|
||||
filename = options.filename;
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine(str);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return CJSX;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = CJSX;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/cjsx/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/cjsx/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./4.x - 5.x');
|
||||
|
||||
}).call(this);
|
||||
55
node_modules/accord/lib/adapters/coco/0.9.x.js
generated
vendored
Normal file
55
node_modules/accord/lib/adapters/coco/0.9.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Coco, W,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
Coco = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(Coco, superClass);
|
||||
|
||||
function Coco() {
|
||||
return Coco.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Coco.prototype.name = 'coco';
|
||||
|
||||
Coco.prototype.extensions = ['co'];
|
||||
|
||||
Coco.prototype.output = 'js';
|
||||
|
||||
Coco.prototype.isolated = true;
|
||||
|
||||
Coco.prototype._render = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return Coco;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Coco;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/coco/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/coco/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./0.9.x');
|
||||
|
||||
}).call(this);
|
||||
80
node_modules/accord/lib/adapters/coffee-script/1.x.js
generated
vendored
Normal file
80
node_modules/accord/lib/adapters/coffee-script/1.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, CoffeeScript, W, path, sourcemaps,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
sourcemaps = require('../../sourcemaps');
|
||||
|
||||
path = require('path');
|
||||
|
||||
W = require('when');
|
||||
|
||||
CoffeeScript = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(CoffeeScript, superClass);
|
||||
|
||||
function CoffeeScript() {
|
||||
return CoffeeScript.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
CoffeeScript.prototype.name = 'coffee-script';
|
||||
|
||||
CoffeeScript.prototype.extensions = ['coffee'];
|
||||
|
||||
CoffeeScript.prototype.output = 'js';
|
||||
|
||||
CoffeeScript.prototype.isolated = true;
|
||||
|
||||
CoffeeScript.prototype._render = function(str, options) {
|
||||
var filename;
|
||||
filename = options.filename;
|
||||
if (options.sourcemap === true) {
|
||||
options.sourceMap = true;
|
||||
}
|
||||
options.sourceFiles = [filename];
|
||||
if (options.filename) {
|
||||
options.generatedFile = path.basename(filename).replace('.coffee', '.js');
|
||||
}
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var data, err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
if (res.sourceMap) {
|
||||
data = {
|
||||
result: res.js,
|
||||
v2sourcemap: res.sourceMap,
|
||||
sourcemap: JSON.parse(res.v3SourceMap)
|
||||
};
|
||||
return sourcemaps.inline_sources(data.sourcemap).then(function(map) {
|
||||
data.sourcemap = map;
|
||||
return data;
|
||||
});
|
||||
} else {
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return CoffeeScript;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = CoffeeScript;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/coffee-script/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/coffee-script/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./1.x');
|
||||
|
||||
}).call(this);
|
||||
58
node_modules/accord/lib/adapters/csso/1.0.x - 1.3.x.js
generated
vendored
Normal file
58
node_modules/accord/lib/adapters/csso/1.0.x - 1.3.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, CSSO, W,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
CSSO = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(CSSO, superClass);
|
||||
|
||||
function CSSO() {
|
||||
return CSSO.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
CSSO.prototype.name = 'csso';
|
||||
|
||||
CSSO.prototype.extensions = ['css'];
|
||||
|
||||
CSSO.prototype.output = 'css';
|
||||
|
||||
CSSO.prototype.isolated = true;
|
||||
|
||||
CSSO.prototype._render = function(str, options) {
|
||||
if (options.noRestructure == null) {
|
||||
options.noRestructure = false;
|
||||
}
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.justDoIt(str, options.noRestructure);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return CSSO;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = CSSO;
|
||||
|
||||
}).call(this);
|
||||
61
node_modules/accord/lib/adapters/csso/2.x.js
generated
vendored
Normal file
61
node_modules/accord/lib/adapters/csso/2.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, CSSO, W,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
CSSO = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(CSSO, superClass);
|
||||
|
||||
function CSSO() {
|
||||
return CSSO.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
CSSO.prototype.name = 'csso';
|
||||
|
||||
CSSO.prototype.extensions = ['css'];
|
||||
|
||||
CSSO.prototype.output = 'css';
|
||||
|
||||
CSSO.prototype.isolated = true;
|
||||
|
||||
CSSO.prototype._render = function(str, options) {
|
||||
if (options.restructuring == null) {
|
||||
options.restructuring = true;
|
||||
}
|
||||
if (options.debug == null) {
|
||||
options.debug = false;
|
||||
}
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.minify(str, options).css;
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return CSSO;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = CSSO;
|
||||
|
||||
}).call(this);
|
||||
61
node_modules/accord/lib/adapters/csso/^1.4.js
generated
vendored
Normal file
61
node_modules/accord/lib/adapters/csso/^1.4.js
generated
vendored
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, CSSO, W,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
CSSO = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(CSSO, superClass);
|
||||
|
||||
function CSSO() {
|
||||
return CSSO.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
CSSO.prototype.name = 'csso';
|
||||
|
||||
CSSO.prototype.extensions = ['css'];
|
||||
|
||||
CSSO.prototype.output = 'css';
|
||||
|
||||
CSSO.prototype.isolated = true;
|
||||
|
||||
CSSO.prototype._render = function(str, options) {
|
||||
if (options.restructuring == null) {
|
||||
options.restructuring = true;
|
||||
}
|
||||
if (options.debug == null) {
|
||||
options.debug = false;
|
||||
}
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.minify(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return CSSO;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = CSSO;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/csso/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/csso/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./2.x');
|
||||
|
||||
}).call(this);
|
||||
38
node_modules/accord/lib/adapters/dogescript/2.x.js
generated
vendored
Normal file
38
node_modules/accord/lib/adapters/dogescript/2.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, DogeScript, W,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
DogeScript = (function(superClass) {
|
||||
extend(DogeScript, superClass);
|
||||
|
||||
function DogeScript() {
|
||||
return DogeScript.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
DogeScript.prototype.name = 'dogescript';
|
||||
|
||||
DogeScript.prototype.extensions = ['djs'];
|
||||
|
||||
DogeScript.prototype.output = 'js';
|
||||
|
||||
DogeScript.prototype.isolated = true;
|
||||
|
||||
DogeScript.prototype._render = function(str, options) {
|
||||
return W.resolve({
|
||||
result: this.engine(str, options.beauty, options.trueDoge)
|
||||
});
|
||||
};
|
||||
|
||||
return DogeScript;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = DogeScript;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/dogescript/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/dogescript/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./2.x');
|
||||
|
||||
}).call(this);
|
||||
80
node_modules/accord/lib/adapters/dot/1.x.js
generated
vendored
Normal file
80
node_modules/accord/lib/adapters/dot/1.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Dot, W, fs, path,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
path = require('path');
|
||||
|
||||
fs = require('fs');
|
||||
|
||||
W = require('when');
|
||||
|
||||
Dot = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(Dot, superClass);
|
||||
|
||||
function Dot() {
|
||||
return Dot.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Dot.prototype.name = 'dot';
|
||||
|
||||
Dot.prototype.extensions = ['dot'];
|
||||
|
||||
Dot.prototype.output = 'html';
|
||||
|
||||
Dot.prototype._render = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str)(options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Dot.prototype._compile = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Dot.prototype._compileClient = function(str, options) {
|
||||
options.client = true;
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options).toString();
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Dot.prototype.clientHelpers = function(str, options) {
|
||||
var runtime_path;
|
||||
runtime_path = path.join(this.engine.__accord_path, 'doT.min.js');
|
||||
return fs.readFileSync(runtime_path, 'utf8');
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return Dot;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Dot;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/dot/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/dot/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./1.x');
|
||||
|
||||
}).call(this);
|
||||
76
node_modules/accord/lib/adapters/eco/1.x.js
generated
vendored
Normal file
76
node_modules/accord/lib/adapters/eco/1.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Eco, W, fs, path,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
path = require('path');
|
||||
|
||||
fs = require('fs');
|
||||
|
||||
W = require('when');
|
||||
|
||||
Eco = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(Eco, superClass);
|
||||
|
||||
function Eco() {
|
||||
return Eco.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Eco.prototype.name = 'eco';
|
||||
|
||||
Eco.prototype.extensions = ['eco'];
|
||||
|
||||
Eco.prototype.output = 'html';
|
||||
|
||||
Eco.prototype._render = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.render(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Eco.prototype._compile = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options);
|
||||
};
|
||||
})(this)).then(function(res) {
|
||||
res.result = eval(res.result);
|
||||
return res;
|
||||
});
|
||||
};
|
||||
|
||||
Eco.prototype._compileClient = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options).toString().trim() + '\n';
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return Eco;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Eco;
|
||||
|
||||
}).call(this);
|
||||
73
node_modules/accord/lib/adapters/eco/=1.1.0-rc-3.js
generated
vendored
Normal file
73
node_modules/accord/lib/adapters/eco/=1.1.0-rc-3.js
generated
vendored
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Eco, W, fs, path,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
path = require('path');
|
||||
|
||||
fs = require('fs');
|
||||
|
||||
W = require('when');
|
||||
|
||||
Eco = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(Eco, superClass);
|
||||
|
||||
function Eco() {
|
||||
return Eco.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Eco.prototype.name = 'eco';
|
||||
|
||||
Eco.prototype.extensions = ['eco'];
|
||||
|
||||
Eco.prototype.output = 'html';
|
||||
|
||||
Eco.prototype._render = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.render(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Eco.prototype._compile = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Eco.prototype._compileClient = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options).toString().trim() + '\n';
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return Eco;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Eco;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/eco/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/eco/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./1.x');
|
||||
|
||||
}).call(this);
|
||||
80
node_modules/accord/lib/adapters/ejs/2.x.js
generated
vendored
Normal file
80
node_modules/accord/lib/adapters/ejs/2.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, EJS, W, fs, path,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
path = require('path');
|
||||
|
||||
fs = require('fs');
|
||||
|
||||
W = require('when');
|
||||
|
||||
EJS = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(EJS, superClass);
|
||||
|
||||
function EJS() {
|
||||
return EJS.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
EJS.prototype.name = 'ejs';
|
||||
|
||||
EJS.prototype.extensions = ['ejs'];
|
||||
|
||||
EJS.prototype.output = 'html';
|
||||
|
||||
EJS.prototype._render = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.render(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
EJS.prototype._compile = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
EJS.prototype._compileClient = function(str, options) {
|
||||
options.client = true;
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options).toString();
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
EJS.prototype.clientHelpers = function(str, options) {
|
||||
var runtime_path;
|
||||
runtime_path = path.join(this.engine.__accord_path, 'ejs.min.js');
|
||||
return fs.readFileSync(runtime_path, 'utf8');
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return EJS;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = EJS;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/ejs/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/ejs/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./2.x');
|
||||
|
||||
}).call(this);
|
||||
62
node_modules/accord/lib/adapters/escape-html/0.5.x.js
generated
vendored
Normal file
62
node_modules/accord/lib/adapters/escape-html/0.5.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, EscapeHTML, W, defaults,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
defaults = require('lodash.defaults');
|
||||
|
||||
EscapeHTML = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(EscapeHTML, superClass);
|
||||
|
||||
function EscapeHTML() {
|
||||
return EscapeHTML.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
EscapeHTML.prototype.name = 'escape-html';
|
||||
|
||||
EscapeHTML.prototype.extensions = ['html'];
|
||||
|
||||
EscapeHTML.prototype.output = 'html';
|
||||
|
||||
EscapeHTML.prototype.supportedEngines = ['he'];
|
||||
|
||||
EscapeHTML.prototype.isolated = true;
|
||||
|
||||
EscapeHTML.prototype._render = function(str, options) {
|
||||
options = defaults(options, {
|
||||
allowUnsafeSymbols: true
|
||||
});
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.encode(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return EscapeHTML;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = EscapeHTML;
|
||||
|
||||
}).call(this);
|
||||
62
node_modules/accord/lib/adapters/escape-html/1.x.js
generated
vendored
Normal file
62
node_modules/accord/lib/adapters/escape-html/1.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, EscapeHTML, W, defaults,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
defaults = require('lodash.defaults');
|
||||
|
||||
EscapeHTML = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(EscapeHTML, superClass);
|
||||
|
||||
function EscapeHTML() {
|
||||
return EscapeHTML.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
EscapeHTML.prototype.name = 'escape-html';
|
||||
|
||||
EscapeHTML.prototype.extensions = ['html'];
|
||||
|
||||
EscapeHTML.prototype.output = 'html';
|
||||
|
||||
EscapeHTML.prototype.supportedEngines = ['he'];
|
||||
|
||||
EscapeHTML.prototype.isolated = true;
|
||||
|
||||
EscapeHTML.prototype._render = function(str, options) {
|
||||
options = defaults(options, {
|
||||
allowUnsafeSymbols: true
|
||||
});
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.encode(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return EscapeHTML;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = EscapeHTML;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/escape-html/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/escape-html/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./1.x');
|
||||
|
||||
}).call(this);
|
||||
69
node_modules/accord/lib/adapters/haml/0.6.x.js
generated
vendored
Normal file
69
node_modules/accord/lib/adapters/haml/0.6.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, HAML, UglifyJS, W, fs, path,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
path = require('path');
|
||||
|
||||
fs = require('fs');
|
||||
|
||||
W = require('when');
|
||||
|
||||
UglifyJS = require('uglify-js');
|
||||
|
||||
HAML = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(HAML, superClass);
|
||||
|
||||
function HAML() {
|
||||
return HAML.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
HAML.prototype.name = 'haml';
|
||||
|
||||
HAML.prototype.extensions = ['haml'];
|
||||
|
||||
HAML.prototype.output = 'html';
|
||||
|
||||
HAML.prototype.supportedEngines = ['hamljs'];
|
||||
|
||||
HAML.prototype._render = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str)(options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
HAML.prototype._compile = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return HAML;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = HAML;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/haml/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/haml/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./0.6.x');
|
||||
|
||||
}).call(this);
|
||||
106
node_modules/accord/lib/adapters/handlebars/3.x - 4.x.js
generated
vendored
Normal file
106
node_modules/accord/lib/adapters/handlebars/3.x - 4.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Handlebars, W, clone, fs, merge, path,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
clone = require('lodash.clone');
|
||||
|
||||
merge = require('lodash.merge');
|
||||
|
||||
path = require('path');
|
||||
|
||||
fs = require('fs');
|
||||
|
||||
W = require('when');
|
||||
|
||||
Handlebars = (function(superClass) {
|
||||
var compile, register_helpers;
|
||||
|
||||
extend(Handlebars, superClass);
|
||||
|
||||
function Handlebars() {
|
||||
return Handlebars.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Handlebars.prototype.name = 'handlebars';
|
||||
|
||||
Handlebars.prototype.extensions = ['hbs', 'handlebars'];
|
||||
|
||||
Handlebars.prototype.output = 'html';
|
||||
|
||||
Handlebars.prototype._render = function(str, options) {
|
||||
var compiler;
|
||||
compiler = clone(this.engine);
|
||||
register_helpers(compiler, options);
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return compiler.compile(str)(options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Handlebars.prototype._compile = function(str, options) {
|
||||
var compiler;
|
||||
compiler = clone(this.engine);
|
||||
register_helpers(compiler, options);
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return compiler.compile(str);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Handlebars.prototype._compileClient = function(str, options) {
|
||||
var compiler;
|
||||
compiler = clone(this.engine);
|
||||
register_helpers(compiler, options);
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return "Handlebars.template(" + (compiler.precompile(str)) + ");";
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Handlebars.prototype.clientHelpers = function() {
|
||||
var runtime_path;
|
||||
runtime_path = path.join(this.engine.__accord_path, 'dist/handlebars.runtime.min.js');
|
||||
return fs.readFileSync(runtime_path, 'utf8');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
|
||||
register_helpers = function(compiler, opts) {
|
||||
if (opts.helpers) {
|
||||
compiler.helpers = merge(compiler.helpers, opts.helpers);
|
||||
}
|
||||
if (opts.partials) {
|
||||
return compiler.partials = merge(compiler.partials, opts.partials);
|
||||
}
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return Handlebars;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Handlebars;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/handlebars/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/handlebars/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./3.x - 4.x');
|
||||
|
||||
}).call(this);
|
||||
86
node_modules/accord/lib/adapters/jade/1.x.js
generated
vendored
Normal file
86
node_modules/accord/lib/adapters/jade/1.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Jade, UglifyJS, W, fs, path,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
path = require('path');
|
||||
|
||||
fs = require('fs');
|
||||
|
||||
W = require('when');
|
||||
|
||||
UglifyJS = require('uglify-js');
|
||||
|
||||
Jade = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(Jade, superClass);
|
||||
|
||||
function Jade() {
|
||||
return Jade.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Jade.prototype.name = 'jade';
|
||||
|
||||
Jade.prototype.extensions = ['jade'];
|
||||
|
||||
Jade.prototype.output = 'html';
|
||||
|
||||
Jade.prototype.supportedEngines = ['jade'];
|
||||
|
||||
Jade.prototype._render = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.render(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Jade.prototype._compile = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Jade.prototype._compileClient = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compileClient(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Jade.prototype.clientHelpers = function() {
|
||||
var runtime, runtime_path;
|
||||
runtime_path = path.join(this.engine.__accord_path, 'runtime.js');
|
||||
runtime = fs.readFileSync(runtime_path, 'utf8');
|
||||
return UglifyJS.minify(runtime, {
|
||||
fromString: true
|
||||
}).code;
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return Jade;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Jade;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/jade/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/jade/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./1.x');
|
||||
|
||||
}).call(this);
|
||||
78
node_modules/accord/lib/adapters/jsx/0.13.x.js
generated
vendored
Normal file
78
node_modules/accord/lib/adapters/jsx/0.13.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, JSX, W, path, sourcemaps,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
sourcemaps = require('../../sourcemaps');
|
||||
|
||||
path = require('path');
|
||||
|
||||
W = require('when');
|
||||
|
||||
JSX = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(JSX, superClass);
|
||||
|
||||
function JSX() {
|
||||
return JSX.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
JSX.prototype.name = 'jsx';
|
||||
|
||||
JSX.prototype.extensions = ['jsx'];
|
||||
|
||||
JSX.prototype.output = 'js';
|
||||
|
||||
JSX.prototype.supportedEngines = ['react-tools'];
|
||||
|
||||
JSX.prototype.isolated = true;
|
||||
|
||||
JSX.prototype._render = function(str, options) {
|
||||
if (options.sourcemap === true) {
|
||||
options.sourceMap = true;
|
||||
options.sourceFilename = options.filename;
|
||||
}
|
||||
return compile(options, (function(_this) {
|
||||
return function() {
|
||||
return _this.engine.transformWithDetails(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(opts, fn) {
|
||||
var data, err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
if (res.sourceMap) {
|
||||
data = {
|
||||
result: res.code,
|
||||
sourcemap: res.sourceMap
|
||||
};
|
||||
data.sourcemap.sources.pop();
|
||||
data.sourcemap.sources.push(opts.filename);
|
||||
return sourcemaps.inline_sources(data.sourcemap).then(function(map) {
|
||||
data.sourcemap = map;
|
||||
return data;
|
||||
});
|
||||
} else {
|
||||
return W.resolve({
|
||||
result: res.code
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return JSX;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = JSX;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/jsx/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/jsx/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./0.13.x');
|
||||
|
||||
}).call(this);
|
||||
67
node_modules/accord/lib/adapters/less/2.x.js
generated
vendored
Normal file
67
node_modules/accord/lib/adapters/less/2.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Less, W, sourcemaps,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
sourcemaps = require('../../sourcemaps');
|
||||
|
||||
W = require('when');
|
||||
|
||||
Less = (function(superClass) {
|
||||
extend(Less, superClass);
|
||||
|
||||
function Less() {
|
||||
return Less.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Less.prototype.name = 'less';
|
||||
|
||||
Less.prototype.extensions = ['less'];
|
||||
|
||||
Less.prototype.output = 'css';
|
||||
|
||||
|
||||
/**
|
||||
* LESS has import rules for other LESS stylesheets
|
||||
*/
|
||||
|
||||
Less.prototype.isolated = false;
|
||||
|
||||
Less.prototype._render = function(str, options) {
|
||||
var deferred;
|
||||
deferred = W.defer();
|
||||
if (options.sourcemap === true) {
|
||||
options.sourceMap = true;
|
||||
}
|
||||
this.engine.render(str, options, function(err, res) {
|
||||
var obj;
|
||||
if (err) {
|
||||
return deferred.reject(err);
|
||||
}
|
||||
obj = {
|
||||
result: res.css,
|
||||
imports: res.imports
|
||||
};
|
||||
if (options.sourceMap && res.map) {
|
||||
obj.sourcemap = JSON.parse(res.map);
|
||||
return sourcemaps.inline_sources(obj.sourcemap).then(function(map) {
|
||||
obj.sourcemap = map;
|
||||
return deferred.resolve(obj);
|
||||
});
|
||||
} else {
|
||||
return deferred.resolve(obj);
|
||||
}
|
||||
});
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
return Less;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Less;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/less/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/less/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./2.x');
|
||||
|
||||
}).call(this);
|
||||
57
node_modules/accord/lib/adapters/marc/0.1.x.js
generated
vendored
Normal file
57
node_modules/accord/lib/adapters/marc/0.1.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Marc, W,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
Marc = (function(superClass) {
|
||||
extend(Marc, superClass);
|
||||
|
||||
function Marc() {
|
||||
return Marc.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Marc.prototype.name = 'marc';
|
||||
|
||||
Marc.prototype.extensions = ['md'];
|
||||
|
||||
Marc.prototype.output = 'html';
|
||||
|
||||
Marc.prototype._render = function(str, options) {
|
||||
var base, k, ref, ref1, ref2, v;
|
||||
base = this.engine();
|
||||
ref = options['data'];
|
||||
for (k in ref) {
|
||||
v = ref[k];
|
||||
base.set(k, v);
|
||||
}
|
||||
delete options['data'];
|
||||
ref1 = options['partial'];
|
||||
for (k in ref1) {
|
||||
v = ref1[k];
|
||||
base.partial(k, v);
|
||||
}
|
||||
delete options['partial'];
|
||||
ref2 = options['filter'];
|
||||
for (k in ref2) {
|
||||
v = ref2[k];
|
||||
base.filter(k, v);
|
||||
}
|
||||
delete options['filter'];
|
||||
base.config(options);
|
||||
return W.resolve({
|
||||
result: base(str, true)
|
||||
});
|
||||
};
|
||||
|
||||
return Marc;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Marc;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/marc/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/marc/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./0.1.x');
|
||||
|
||||
}).call(this);
|
||||
42
node_modules/accord/lib/adapters/markdown/0.3.x.js
generated
vendored
Normal file
42
node_modules/accord/lib/adapters/markdown/0.3.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Markdown, nodefn,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
nodefn = require('when/node/function');
|
||||
|
||||
Markdown = (function(superClass) {
|
||||
extend(Markdown, superClass);
|
||||
|
||||
function Markdown() {
|
||||
return Markdown.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Markdown.prototype.name = 'markdown';
|
||||
|
||||
Markdown.prototype.extensions = ['md', 'mdown', 'markdown'];
|
||||
|
||||
Markdown.prototype.output = 'html';
|
||||
|
||||
Markdown.prototype.supportedEngines = ['marked'];
|
||||
|
||||
Markdown.prototype.isolated = true;
|
||||
|
||||
Markdown.prototype._render = function(str, options) {
|
||||
return nodefn.call(this.engine.bind(this.engine), str, options).then(function(res) {
|
||||
return {
|
||||
result: res
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
return Markdown;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Markdown;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/markdown/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/markdown/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./0.3.x');
|
||||
|
||||
}).call(this);
|
||||
68
node_modules/accord/lib/adapters/minify-css/3.x.js
generated
vendored
Normal file
68
node_modules/accord/lib/adapters/minify-css/3.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, MinifyCSS, W,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
MinifyCSS = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(MinifyCSS, superClass);
|
||||
|
||||
function MinifyCSS() {
|
||||
return MinifyCSS.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
MinifyCSS.prototype.name = 'minify-css';
|
||||
|
||||
MinifyCSS.prototype.extensions = ['css'];
|
||||
|
||||
MinifyCSS.prototype.output = 'css';
|
||||
|
||||
MinifyCSS.prototype.supportedEngines = ['clean-css'];
|
||||
|
||||
|
||||
/**
|
||||
* It is sometimes isolated, but not always because you can get it to process
|
||||
`import` rules with `processImport`
|
||||
*/
|
||||
|
||||
MinifyCSS.prototype.isolated = false;
|
||||
|
||||
MinifyCSS.prototype._render = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return (new _this.engine(options)).minify(str);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
if (res.errors.length > 0) {
|
||||
W.reject(res);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res.styles,
|
||||
warnings: res.warnings,
|
||||
stats: res.stats
|
||||
});
|
||||
};
|
||||
|
||||
return MinifyCSS;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = MinifyCSS;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/minify-css/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/minify-css/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./3.x');
|
||||
|
||||
}).call(this);
|
||||
71
node_modules/accord/lib/adapters/minify-html/0.7.x - 1.x.js
generated
vendored
Normal file
71
node_modules/accord/lib/adapters/minify-html/0.7.x - 1.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, MinifyHTML, W, defaults,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
defaults = require('lodash.defaults');
|
||||
|
||||
MinifyHTML = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(MinifyHTML, superClass);
|
||||
|
||||
function MinifyHTML() {
|
||||
return MinifyHTML.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
MinifyHTML.prototype.name = 'minify-html';
|
||||
|
||||
MinifyHTML.prototype.extensions = ['html'];
|
||||
|
||||
MinifyHTML.prototype.output = 'html';
|
||||
|
||||
MinifyHTML.prototype.supportedEngines = ['html-minifier'];
|
||||
|
||||
|
||||
/**
|
||||
* I think that you could cause this to not be isolated by using the minifyCSS
|
||||
option and then making that import stylesheets, but I'm not even sure if
|
||||
MinifyHTML would support that...
|
||||
*/
|
||||
|
||||
MinifyHTML.prototype.isolated = true;
|
||||
|
||||
MinifyHTML.prototype._render = function(str, options) {
|
||||
options = defaults(options, {
|
||||
removeComments: true,
|
||||
collapseWhitespace: true,
|
||||
removeEmptyAttributes: true
|
||||
});
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.minify(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return MinifyHTML;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = MinifyHTML;
|
||||
|
||||
}).call(this);
|
||||
71
node_modules/accord/lib/adapters/minify-html/2.x - 3.x.js
generated
vendored
Normal file
71
node_modules/accord/lib/adapters/minify-html/2.x - 3.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, MinifyHTML, W, defaults,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
defaults = require('lodash.defaults');
|
||||
|
||||
MinifyHTML = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(MinifyHTML, superClass);
|
||||
|
||||
function MinifyHTML() {
|
||||
return MinifyHTML.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
MinifyHTML.prototype.name = 'minify-html';
|
||||
|
||||
MinifyHTML.prototype.extensions = ['html'];
|
||||
|
||||
MinifyHTML.prototype.output = 'html';
|
||||
|
||||
MinifyHTML.prototype.supportedEngines = ['html-minifier'];
|
||||
|
||||
|
||||
/**
|
||||
* I think that you could cause this to not be isolated by using the minifyCSS
|
||||
option and then making that import stylesheets, but I'm not even sure if
|
||||
MinifyHTML would support that...
|
||||
*/
|
||||
|
||||
MinifyHTML.prototype.isolated = true;
|
||||
|
||||
MinifyHTML.prototype._render = function(str, options) {
|
||||
options = defaults(options, {
|
||||
removeComments: true,
|
||||
collapseWhitespace: true,
|
||||
removeEmptyAttributes: true
|
||||
});
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.minify(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return MinifyHTML;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = MinifyHTML;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/minify-html/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/minify-html/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./2.x - 3.x');
|
||||
|
||||
}).call(this);
|
||||
83
node_modules/accord/lib/adapters/minify-js/2.x.js
generated
vendored
Normal file
83
node_modules/accord/lib/adapters/minify-js/2.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, MinifyJS, W, convert, path, sourcemaps,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
sourcemaps = require('../../sourcemaps');
|
||||
|
||||
W = require('when');
|
||||
|
||||
path = require('path');
|
||||
|
||||
convert = require('convert-source-map');
|
||||
|
||||
MinifyJS = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(MinifyJS, superClass);
|
||||
|
||||
function MinifyJS() {
|
||||
return MinifyJS.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
MinifyJS.prototype.name = 'minify-js';
|
||||
|
||||
MinifyJS.prototype.extensions = ['js'];
|
||||
|
||||
MinifyJS.prototype.output = 'js';
|
||||
|
||||
MinifyJS.prototype.supportedEngines = ['uglify-js'];
|
||||
|
||||
MinifyJS.prototype.isolated = true;
|
||||
|
||||
MinifyJS.prototype._render = function(str, options) {
|
||||
if (options.sourcemap === true) {
|
||||
options.sourceMap = true;
|
||||
options.outSourceMap = path.basename(options.filename);
|
||||
}
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
var obj, res;
|
||||
res = _this.engine.minify(str, Object.assign(options, {
|
||||
fromString: true
|
||||
}));
|
||||
obj = {
|
||||
result: res.code
|
||||
};
|
||||
if (options.sourceMap) {
|
||||
obj.sourcemap = JSON.parse(res.map);
|
||||
obj.sourcemap.sources.pop();
|
||||
obj.sourcemap.sources.push(options.filename);
|
||||
obj.result = convert.removeMapFileComments(obj.result).trim();
|
||||
return sourcemaps.inline_sources(obj.sourcemap).then(function(map) {
|
||||
obj.sourcemap = map;
|
||||
return obj;
|
||||
});
|
||||
} else {
|
||||
return obj;
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn, map) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve(res);
|
||||
};
|
||||
|
||||
return MinifyJS;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = MinifyJS;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/minify-js/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/minify-js/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./2.x');
|
||||
|
||||
}).call(this);
|
||||
85
node_modules/accord/lib/adapters/mustache/3.x.js
generated
vendored
Normal file
85
node_modules/accord/lib/adapters/mustache/3.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Mustache, W, fs, path, util,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
util = require('util');
|
||||
|
||||
fs = require('fs');
|
||||
|
||||
path = require('path');
|
||||
|
||||
Mustache = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(Mustache, superClass);
|
||||
|
||||
function Mustache() {
|
||||
return Mustache.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Mustache.prototype.name = 'mustache';
|
||||
|
||||
Mustache.prototype.extensions = ['mustache', 'hogan'];
|
||||
|
||||
Mustache.prototype.output = 'html';
|
||||
|
||||
Mustache.prototype.supportedEngines = ['hogan.js'];
|
||||
|
||||
Mustache.prototype._render = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options).render(options, options.partials);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Mustache.prototype._compile = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Mustache.prototype._compileClient = function(str, options) {
|
||||
options.asString = true;
|
||||
return this._compile(str, options).then(function(o) {
|
||||
return {
|
||||
result: "new Hogan.Template(" + (o.result.toString()) + ");"
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
Mustache.prototype.clientHelpers = function() {
|
||||
var runtime_path, version;
|
||||
version = require(path.join(this.engine.__accord_path, 'package')).version;
|
||||
runtime_path = path.join(this.engine.__accord_path, "web/builds/" + version + "/hogan-" + version + ".min.js");
|
||||
return fs.readFileSync(runtime_path, 'utf8');
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return Mustache;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Mustache;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/mustache/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/mustache/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./3.x');
|
||||
|
||||
}).call(this);
|
||||
66
node_modules/accord/lib/adapters/myth/1.x.js
generated
vendored
Normal file
66
node_modules/accord/lib/adapters/myth/1.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Myth, W, convert,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
convert = require('convert-source-map');
|
||||
|
||||
W = require('when');
|
||||
|
||||
Myth = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(Myth, superClass);
|
||||
|
||||
function Myth() {
|
||||
return Myth.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Myth.prototype.name = 'myth';
|
||||
|
||||
Myth.prototype.extensions = ['myth', 'mcss'];
|
||||
|
||||
Myth.prototype.output = 'css';
|
||||
|
||||
Myth.prototype._render = function(str, options) {
|
||||
options.source = options.filename;
|
||||
delete options.filename;
|
||||
return compile(options.sourcemap, ((function(_this) {
|
||||
return function() {
|
||||
return _this.engine(str, options);
|
||||
};
|
||||
})(this)));
|
||||
};
|
||||
|
||||
compile = function(sourcemap, fn) {
|
||||
var data, err, map, res, src;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
data = {
|
||||
result: res
|
||||
};
|
||||
if (sourcemap) {
|
||||
map = convert.fromSource(res).sourcemap;
|
||||
src = convert.removeComments(res);
|
||||
data = {
|
||||
result: src,
|
||||
sourcemap: map
|
||||
};
|
||||
}
|
||||
return W.resolve(data);
|
||||
};
|
||||
|
||||
return Myth;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Myth;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/myth/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/myth/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./1.x');
|
||||
|
||||
}).call(this);
|
||||
64
node_modules/accord/lib/adapters/postcss/4.x - 5.x.js
generated
vendored
Normal file
64
node_modules/accord/lib/adapters/postcss/4.x - 5.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, PostCSS, W, convert, path, sourcemaps,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
sourcemaps = require('../../sourcemaps');
|
||||
|
||||
W = require('when');
|
||||
|
||||
path = require('path');
|
||||
|
||||
convert = require('convert-source-map');
|
||||
|
||||
PostCSS = (function(superClass) {
|
||||
extend(PostCSS, superClass);
|
||||
|
||||
function PostCSS() {
|
||||
return PostCSS.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
PostCSS.prototype.name = 'postcss';
|
||||
|
||||
PostCSS.prototype.extensions = ['css', 'pcss', 'sss'];
|
||||
|
||||
PostCSS.prototype.output = 'css';
|
||||
|
||||
PostCSS.prototype._render = function(str, options) {
|
||||
var processor, ref, use;
|
||||
use = (ref = options.use) != null ? ref : [];
|
||||
processor = this.engine(use);
|
||||
if (options.map === true) {
|
||||
options.map = {
|
||||
inline: false
|
||||
};
|
||||
options.from = options.filename;
|
||||
}
|
||||
return W(processor.process(str, options)).then(function(res) {
|
||||
var obj;
|
||||
obj = {
|
||||
result: res.css
|
||||
};
|
||||
if (options.map) {
|
||||
obj.sourcemap = JSON.parse(res.map);
|
||||
obj.result = convert.removeMapFileComments(obj.result).trim();
|
||||
return sourcemaps.inline_sources(obj.sourcemap).then(function(map) {
|
||||
obj.sourcemap = map;
|
||||
return obj;
|
||||
});
|
||||
} else {
|
||||
return obj;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return PostCSS;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = PostCSS;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/postcss/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/postcss/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./4.x - 5.x');
|
||||
|
||||
}).call(this);
|
||||
71
node_modules/accord/lib/adapters/scss/2.x.js
generated
vendored
Normal file
71
node_modules/accord/lib/adapters/scss/2.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, SCSS, W, path,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
path = require('path');
|
||||
|
||||
SCSS = (function(superClass) {
|
||||
extend(SCSS, superClass);
|
||||
|
||||
function SCSS() {
|
||||
return SCSS.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
SCSS.prototype.name = 'scss';
|
||||
|
||||
SCSS.prototype.extensions = ['scss', 'sass'];
|
||||
|
||||
SCSS.prototype.output = 'css';
|
||||
|
||||
SCSS.prototype.supportedEngines = ['node-sass'];
|
||||
|
||||
SCSS.prototype._render = function(str, options) {
|
||||
var deferred;
|
||||
deferred = W.defer();
|
||||
if (options.sourcemap === true) {
|
||||
options.sourceMap = true;
|
||||
options.outFile = path.basename(options.filename).replace('.scss', '.css');
|
||||
options.omitSourceMapUrl = true;
|
||||
options.sourceMapContents = true;
|
||||
}
|
||||
options.file = options.filename;
|
||||
options.data = str;
|
||||
options.error = function(err) {
|
||||
return deferred.reject(err);
|
||||
};
|
||||
options.success = function(res) {
|
||||
var data;
|
||||
data = {
|
||||
result: String(res.css),
|
||||
imports: res.stats.includedFiles,
|
||||
meta: {
|
||||
entry: res.stats.entry,
|
||||
start: res.stats.start,
|
||||
end: res.stats.end,
|
||||
duration: res.stats.duration
|
||||
}
|
||||
};
|
||||
if (res.map && Object.keys(JSON.parse(res.map)).length) {
|
||||
data.sourcemap = JSON.parse(res.map);
|
||||
data.sourcemap.sources.pop();
|
||||
data.sourcemap.sources.push(options.file);
|
||||
}
|
||||
return deferred.resolve(data);
|
||||
};
|
||||
this.engine.render(options);
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
return SCSS;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = SCSS;
|
||||
|
||||
}).call(this);
|
||||
72
node_modules/accord/lib/adapters/scss/3.x - 4.x.js
generated
vendored
Normal file
72
node_modules/accord/lib/adapters/scss/3.x - 4.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, SCSS, W, path,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
path = require('path');
|
||||
|
||||
SCSS = (function(superClass) {
|
||||
extend(SCSS, superClass);
|
||||
|
||||
function SCSS() {
|
||||
return SCSS.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
SCSS.prototype.name = 'scss';
|
||||
|
||||
SCSS.prototype.extensions = ['scss', 'sass'];
|
||||
|
||||
SCSS.prototype.output = 'css';
|
||||
|
||||
SCSS.prototype.supportedEngines = ['node-sass'];
|
||||
|
||||
SCSS.prototype._render = function(str, options) {
|
||||
var deferred;
|
||||
deferred = W.defer();
|
||||
if (options.sourcemap === true) {
|
||||
options.sourceMap = true;
|
||||
options.outFile = options.filename.replace('.scss', '.css');
|
||||
options.omitSourceMapUrl = true;
|
||||
options.sourceMapContents = true;
|
||||
}
|
||||
options.file = options.filename;
|
||||
options.data = str;
|
||||
this.engine.render(options, function(err, res) {
|
||||
var basePath, data;
|
||||
if (err) {
|
||||
return deferred.reject(err);
|
||||
}
|
||||
data = {
|
||||
result: String(res.css),
|
||||
imports: res.stats.includedFiles,
|
||||
meta: {
|
||||
entry: res.stats.entry,
|
||||
start: res.stats.start,
|
||||
end: res.stats.end,
|
||||
duration: res.stats.duration
|
||||
}
|
||||
};
|
||||
if (res.map) {
|
||||
data.sourcemap = JSON.parse(res.map.toString('utf8'));
|
||||
basePath = path.dirname(options.filename);
|
||||
data.sourcemap.sources = data.sourcemap.sources.map(function(relativePath) {
|
||||
return path.join(basePath, relativePath);
|
||||
});
|
||||
}
|
||||
return deferred.resolve(data);
|
||||
});
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
return SCSS;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = SCSS;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/scss/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/scss/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./3.x - 4.x');
|
||||
|
||||
}).call(this);
|
||||
127
node_modules/accord/lib/adapters/stylus/0.x.js
generated
vendored
Normal file
127
node_modules/accord/lib/adapters/stylus/0.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Stylus, flatten, nodefn, sourcemaps,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
sourcemaps = require('../../sourcemaps');
|
||||
|
||||
nodefn = require('when/node/function');
|
||||
|
||||
flatten = require('lodash.flatten');
|
||||
|
||||
Stylus = (function(superClass) {
|
||||
extend(Stylus, superClass);
|
||||
|
||||
function Stylus() {
|
||||
return Stylus.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Stylus.prototype.name = 'stylus';
|
||||
|
||||
Stylus.prototype.extensions = ['styl'];
|
||||
|
||||
Stylus.prototype.output = 'css';
|
||||
|
||||
Stylus.prototype._render = function(str, options) {
|
||||
var base, defines, i, imports, includes, j, k, l, len, len1, len2, m, obj, plugins, rawDefines, sets, v;
|
||||
sets = {};
|
||||
defines = {};
|
||||
rawDefines = {};
|
||||
includes = [];
|
||||
imports = [];
|
||||
plugins = [];
|
||||
if (options.sourcemap === true) {
|
||||
options.sourcemap = {
|
||||
comment: false
|
||||
};
|
||||
}
|
||||
for (k in options) {
|
||||
v = options[k];
|
||||
switch (k) {
|
||||
case 'define':
|
||||
Object.assign(defines, v);
|
||||
break;
|
||||
case 'rawDefine':
|
||||
Object.assign(rawDefines, v);
|
||||
break;
|
||||
case 'include':
|
||||
includes.push(v);
|
||||
break;
|
||||
case 'import':
|
||||
imports.push(v);
|
||||
break;
|
||||
case 'use':
|
||||
plugins.push(v);
|
||||
break;
|
||||
case 'url':
|
||||
if (typeof v === 'string') {
|
||||
obj = {};
|
||||
obj[v] = this.engine.url();
|
||||
Object.assign(defines, obj);
|
||||
} else {
|
||||
obj = {};
|
||||
obj[v.name] = this.engine.url({
|
||||
limit: v.limit != null ? v.limit : 30000,
|
||||
paths: v.paths || []
|
||||
});
|
||||
Object.assign(defines, obj);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
sets[k] = v;
|
||||
}
|
||||
}
|
||||
includes = flatten(includes);
|
||||
imports = flatten(imports);
|
||||
plugins = flatten(plugins);
|
||||
base = this.engine(str);
|
||||
for (k in sets) {
|
||||
v = sets[k];
|
||||
base.set(k, v);
|
||||
}
|
||||
for (k in defines) {
|
||||
v = defines[k];
|
||||
base.define(k, v);
|
||||
}
|
||||
for (k in rawDefines) {
|
||||
v = rawDefines[k];
|
||||
base.define(k, v, true);
|
||||
}
|
||||
for (j = 0, len = includes.length; j < len; j++) {
|
||||
i = includes[j];
|
||||
base.include(i);
|
||||
}
|
||||
for (l = 0, len1 = imports.length; l < len1; l++) {
|
||||
i = imports[l];
|
||||
base["import"](i);
|
||||
}
|
||||
for (m = 0, len2 = plugins.length; m < len2; m++) {
|
||||
i = plugins[m];
|
||||
base.use(i);
|
||||
}
|
||||
return nodefn.call(base.render.bind(base)).then(function(res) {
|
||||
return obj = {
|
||||
result: res
|
||||
};
|
||||
}).then(function(obj) {
|
||||
if (base.sourcemap) {
|
||||
return sourcemaps.inline_sources(base.sourcemap).then(function(map) {
|
||||
obj.sourcemap = map;
|
||||
return obj;
|
||||
});
|
||||
} else {
|
||||
return obj;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return Stylus;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Stylus;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/stylus/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/stylus/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./0.x');
|
||||
|
||||
}).call(this);
|
||||
103
node_modules/accord/lib/adapters/swig/1.x.js
generated
vendored
Normal file
103
node_modules/accord/lib/adapters/swig/1.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Swig, UglifyJS, W, fs, path,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
path = require('path');
|
||||
|
||||
fs = require('fs');
|
||||
|
||||
W = require('when');
|
||||
|
||||
UglifyJS = require('uglify-js');
|
||||
|
||||
Swig = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(Swig, superClass);
|
||||
|
||||
function Swig() {
|
||||
return Swig.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Swig.prototype.name = 'swig';
|
||||
|
||||
Swig.prototype.extensions = ['swig'];
|
||||
|
||||
Swig.prototype.output = 'html';
|
||||
|
||||
Swig.prototype._render = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.render(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Swig.prototype._compile = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compile(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Swig.prototype._compileClient = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.precompile(str, options).tpl.toString();
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Swig.prototype.renderFile = function(path, options) {
|
||||
if (options == null) {
|
||||
options = {};
|
||||
}
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.renderFile(path, options.locals);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Swig.prototype.compileFile = function(path, options) {
|
||||
if (options == null) {
|
||||
options = {};
|
||||
}
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compileFile(path, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Swig.prototype.clientHelpers = function() {
|
||||
var runtime_path;
|
||||
runtime_path = path.join(this.engine.__accord_path, 'dist/swig.min.js');
|
||||
return fs.readFileSync(runtime_path, 'utf8');
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return Swig;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Swig;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/swig/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/swig/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./1.x');
|
||||
|
||||
}).call(this);
|
||||
79
node_modules/accord/lib/adapters/toffee/0.1.x.js
generated
vendored
Normal file
79
node_modules/accord/lib/adapters/toffee/0.1.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, Toffee, W, fs,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
fs = require('fs');
|
||||
|
||||
Toffee = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(Toffee, superClass);
|
||||
|
||||
function Toffee() {
|
||||
return Toffee.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Toffee.prototype.name = 'toffee';
|
||||
|
||||
Toffee.prototype.extensions = ['toffee'];
|
||||
|
||||
Toffee.prototype.output = 'html';
|
||||
|
||||
Toffee.prototype.supportedEngines = ['toffee'];
|
||||
|
||||
Toffee.prototype._render = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.str_render(str, options, function(err, res) {
|
||||
if (res.indexOf("<div style=\"font-family:courier new;font-size:12px;color:#900;width:100%;\">") !== -1) {
|
||||
throw res;
|
||||
} else {
|
||||
return res;
|
||||
}
|
||||
});
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Toffee.prototype._compile = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compileStr(str).toString();
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Toffee.prototype._compileClient = function(str, options) {
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.configurable_compile(str, options);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return Toffee;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = Toffee;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/toffee/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/toffee/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./0.1.x');
|
||||
|
||||
}).call(this);
|
||||
63
node_modules/accord/lib/adapters/typescript/1.x.js
generated
vendored
Normal file
63
node_modules/accord/lib/adapters/typescript/1.x.js
generated
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var Adapter, TypeScript, W,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Adapter = require('../../adapter_base');
|
||||
|
||||
W = require('when');
|
||||
|
||||
TypeScript = (function(superClass) {
|
||||
var compile;
|
||||
|
||||
extend(TypeScript, superClass);
|
||||
|
||||
function TypeScript() {
|
||||
return TypeScript.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
TypeScript.prototype.name = 'typescript';
|
||||
|
||||
TypeScript.prototype.engineName = 'typescript-compiler';
|
||||
|
||||
TypeScript.prototype.supportedEngines = ['typescript-compiler'];
|
||||
|
||||
TypeScript.prototype.extensions = ['ts'];
|
||||
|
||||
TypeScript.prototype.output = 'js';
|
||||
|
||||
TypeScript.prototype.isolated = true;
|
||||
|
||||
TypeScript.prototype._render = function(str, options) {
|
||||
var throwOnError;
|
||||
throwOnError = function(err) {
|
||||
throw err;
|
||||
};
|
||||
return compile((function(_this) {
|
||||
return function() {
|
||||
return _this.engine.compileString(str, void 0, options, throwOnError);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
compile = function(fn) {
|
||||
var err, res;
|
||||
try {
|
||||
res = fn();
|
||||
} catch (error) {
|
||||
err = error;
|
||||
return W.reject(err);
|
||||
}
|
||||
return W.resolve({
|
||||
result: res
|
||||
});
|
||||
};
|
||||
|
||||
return TypeScript;
|
||||
|
||||
})(Adapter);
|
||||
|
||||
module.exports = TypeScript;
|
||||
|
||||
}).call(this);
|
||||
5
node_modules/accord/lib/adapters/typescript/index.js
generated
vendored
Normal file
5
node_modules/accord/lib/adapters/typescript/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
module.exports = require('./1.x');
|
||||
|
||||
}).call(this);
|
||||
98
node_modules/accord/lib/index.js
generated
vendored
Normal file
98
node_modules/accord/lib/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var abstract_mapper, adapter_to_name, fs, get_version, glob, indx, match_version_to_adapter, name_to_adapter, path, resolve, resolve_engine_path, semver, supports;
|
||||
|
||||
path = require('path');
|
||||
|
||||
fs = require('fs');
|
||||
|
||||
glob = require('glob');
|
||||
|
||||
indx = require('indx');
|
||||
|
||||
resolve = require('resolve');
|
||||
|
||||
semver = require('semver');
|
||||
|
||||
exports.supports = supports = function(name) {
|
||||
name = adapter_to_name(name);
|
||||
return !!glob.sync("" + (path.join(__dirname, 'adapters', name))).length;
|
||||
};
|
||||
|
||||
exports.load = function(name, custom_path, engine_name) {
|
||||
var adapter_name, engine_path, version;
|
||||
name = adapter_to_name(name);
|
||||
engine_path = resolve_engine_path(name, custom_path);
|
||||
version = get_version(engine_path);
|
||||
adapter_name = match_version_to_adapter(name, version);
|
||||
if (!adapter_name) {
|
||||
throw new Error(name + " version " + version + " is not currently supported");
|
||||
}
|
||||
return new (require(adapter_name))(engine_name, engine_path);
|
||||
};
|
||||
|
||||
exports.all = function() {
|
||||
return indx(path.join(__dirname, 'adapters'));
|
||||
};
|
||||
|
||||
exports.abstract_mapper = abstract_mapper = function(name, direction) {
|
||||
var name_maps, res;
|
||||
name_maps = [['markdown', 'marked'], ['minify-js', 'uglify-js'], ['minify-css', 'clean-css'], ['minify-html', 'html-minifier'], ['mustache', 'hogan.js'], ['scss', 'node-sass'], ['haml', 'hamljs'], ['escape-html', 'he'], ['jsx', 'react-tools'], ['cjsx', 'coffee-react-transform'], ['babel', 'babel-core'], ['typescript', 'typescript-compiler']];
|
||||
res = null;
|
||||
name_maps.forEach(function(n) {
|
||||
if (direction === 'left' && n[0] === name) {
|
||||
res = n[1];
|
||||
}
|
||||
if (direction === 'right' && n[1] === name) {
|
||||
return res = n[0];
|
||||
}
|
||||
});
|
||||
return res || name;
|
||||
};
|
||||
|
||||
exports.adapter_to_name = adapter_to_name = function(name) {
|
||||
return abstract_mapper(name, 'right');
|
||||
};
|
||||
|
||||
exports.name_to_adapter = name_to_adapter = function(name) {
|
||||
return abstract_mapper(name, 'left');
|
||||
};
|
||||
|
||||
resolve_engine_path = function(name, custom_path) {
|
||||
var filepath;
|
||||
filepath = custom_path != null ? resolve.sync(name_to_adapter(name), {
|
||||
basedir: custom_path
|
||||
}) : require.resolve(name_to_adapter(name));
|
||||
while (true) {
|
||||
if (filepath === '/') {
|
||||
throw new Error("cannot resolve root of node module " + name);
|
||||
}
|
||||
filepath = path.dirname(filepath);
|
||||
if (fs.existsSync(path.join(filepath, 'package.json'))) {
|
||||
return filepath;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
get_version = function(engine_path) {
|
||||
var err;
|
||||
try {
|
||||
return require(engine_path + '/package.json').version;
|
||||
} catch (error) {
|
||||
err = error;
|
||||
}
|
||||
};
|
||||
|
||||
match_version_to_adapter = function(name, version) {
|
||||
var adapter, adapters, i, len;
|
||||
adapters = fs.readdirSync(path.join(__dirname, 'adapters', name));
|
||||
for (i = 0, len = adapters.length; i < len; i++) {
|
||||
adapter = adapters[i];
|
||||
adapter = adapter.replace(/\.(?:js|coffee)$/, '');
|
||||
if (semver.satisfies(version, adapter)) {
|
||||
return path.join(__dirname, 'adapters', name, adapter);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
34
node_modules/accord/lib/sourcemaps.js
generated
vendored
Normal file
34
node_modules/accord/lib/sourcemaps.js
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
// Generated by CoffeeScript 1.12.1
|
||||
(function() {
|
||||
var W, fs, node;
|
||||
|
||||
W = require('when');
|
||||
|
||||
node = require('when/node');
|
||||
|
||||
fs = require('fs');
|
||||
|
||||
|
||||
/**
|
||||
* Reads a source map's sources and inlines them in the `sourcesContents` key,
|
||||
* returning the full map.
|
||||
*
|
||||
* @param {Object} map - source map v3
|
||||
* @return {Promise} a promise for the sourcemap updated with contents
|
||||
*/
|
||||
|
||||
exports.inline_sources = function(map) {
|
||||
if (map.sourcesContent) {
|
||||
return W.resolve(map);
|
||||
}
|
||||
return W.map(map.sources, function(source) {
|
||||
return node.call(fs.readFile.bind(fs), source, 'utf8');
|
||||
}).then(function(contents) {
|
||||
map.sourcesContent = contents;
|
||||
return map;
|
||||
})["catch"](function() {
|
||||
return map;
|
||||
});
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
10
node_modules/accord/license.md
generated
vendored
Normal file
10
node_modules/accord/license.md
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
License (MIT)
|
||||
-------------
|
||||
|
||||
Copyright (c) 2013 Jeff Escalante
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
1
node_modules/accord/node_modules/.bin/semver
generated
vendored
Symbolic link
1
node_modules/accord/node_modules/.bin/semver
generated
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../semver/bin/semver
|
||||
16
node_modules/accord/node_modules/convert-source-map/.npmignore
generated
vendored
Normal file
16
node_modules/accord/node_modules/convert-source-map/.npmignore
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
lib-cov
|
||||
*.seed
|
||||
*.log
|
||||
*.csv
|
||||
*.dat
|
||||
*.out
|
||||
*.pid
|
||||
*.gz
|
||||
|
||||
pids
|
||||
logs
|
||||
results
|
||||
|
||||
node_modules
|
||||
npm-debug.log
|
||||
tmp
|
||||
7
node_modules/accord/node_modules/convert-source-map/.travis.yml
generated
vendored
Normal file
7
node_modules/accord/node_modules/convert-source-map/.travis.yml
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- "0.10"
|
||||
- "0.12"
|
||||
- "4"
|
||||
- "6"
|
||||
- "node"
|
||||
23
node_modules/accord/node_modules/convert-source-map/LICENSE
generated
vendored
Normal file
23
node_modules/accord/node_modules/convert-source-map/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
Copyright 2013 Thorsten Lorenz.
|
||||
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 in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
125
node_modules/accord/node_modules/convert-source-map/README.md
generated
vendored
Normal file
125
node_modules/accord/node_modules/convert-source-map/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
# convert-source-map [](http://travis-ci.org/thlorenz/convert-source-map)
|
||||
|
||||
[](https://nodei.co/npm/convert-source-map/)
|
||||
|
||||
Converts a source-map from/to different formats and allows adding/changing properties.
|
||||
|
||||
```js
|
||||
var convert = require('convert-source-map');
|
||||
|
||||
var json = convert
|
||||
.fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
|
||||
.toJSON();
|
||||
|
||||
var modified = convert
|
||||
.fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
|
||||
.setProperty('sources', [ 'CONSOLE.LOG("HI");' ])
|
||||
.toJSON();
|
||||
|
||||
console.log(json);
|
||||
console.log(modified);
|
||||
```
|
||||
|
||||
```json
|
||||
{"version":3,"file":"foo.js","sources":["console.log(\"hi\");"],"names":[],"mappings":"AAAA","sourceRoot":"/"}
|
||||
{"version":3,"file":"foo.js","sources":["CONSOLE.LOG(\"HI\");"],"names":[],"mappings":"AAAA","sourceRoot":"/"}
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### fromObject(obj)
|
||||
|
||||
Returns source map converter from given object.
|
||||
|
||||
### fromJSON(json)
|
||||
|
||||
Returns source map converter from given json string.
|
||||
|
||||
### fromBase64(base64)
|
||||
|
||||
Returns source map converter from given base64 encoded json string.
|
||||
|
||||
### fromComment(comment)
|
||||
|
||||
Returns source map converter from given base64 encoded json string prefixed with `//# sourceMappingURL=...`.
|
||||
|
||||
### fromMapFileComment(comment, mapFileDir)
|
||||
|
||||
Returns source map converter from given `filename` by parsing `//# sourceMappingURL=filename`.
|
||||
|
||||
`filename` must point to a file that is found inside the `mapFileDir`. Most tools store this file right next to the
|
||||
generated file, i.e. the one containing the source map.
|
||||
|
||||
### fromSource(source)
|
||||
|
||||
Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found.
|
||||
|
||||
### fromMapFileSource(source, mapFileDir)
|
||||
|
||||
Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was
|
||||
found.
|
||||
|
||||
The sourcemap will be read from the map file found by parsing `# sourceMappingURL=file` comment. For more info see
|
||||
fromMapFileComment.
|
||||
|
||||
### toObject()
|
||||
|
||||
Returns a copy of the underlying source map.
|
||||
|
||||
### toJSON([space])
|
||||
|
||||
Converts source map to json string. If `space` is given (optional), this will be passed to
|
||||
[JSON.stringify](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify) when the
|
||||
JSON string is generated.
|
||||
|
||||
### toBase64()
|
||||
|
||||
Converts source map to base64 encoded json string.
|
||||
|
||||
### toComment([options])
|
||||
|
||||
Converts source map to an inline comment that can be appended to the source-file.
|
||||
|
||||
By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would
|
||||
normally see in a JS source file.
|
||||
|
||||
When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file.
|
||||
|
||||
### addProperty(key, value)
|
||||
|
||||
Adds given property to the source map. Throws an error if property already exists.
|
||||
|
||||
### setProperty(key, value)
|
||||
|
||||
Sets given property to the source map. If property doesn't exist it is added, otherwise its value is updated.
|
||||
|
||||
### getProperty(key)
|
||||
|
||||
Gets given property of the source map.
|
||||
|
||||
### removeComments(src)
|
||||
|
||||
Returns `src` with all source map comments removed
|
||||
|
||||
### removeMapFileComments(src)
|
||||
|
||||
Returns `src` with all source map comments pointing to map files removed.
|
||||
|
||||
### commentRegex
|
||||
|
||||
Returns the regex used to find source map comments.
|
||||
|
||||
### mapFileCommentRegex
|
||||
|
||||
Returns the regex used to find source map comments pointing to map files.
|
||||
|
||||
### generateMapFileComment(file, [options])
|
||||
|
||||
Returns a comment that links to an external source map via `file`.
|
||||
|
||||
By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would normally see in a JS source file.
|
||||
|
||||
When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file.
|
||||
|
||||
|
||||
[](https://bitdeli.com/free "Bitdeli Badge")
|
||||
15
node_modules/accord/node_modules/convert-source-map/example/comment-to-json.js
generated
vendored
Normal file
15
node_modules/accord/node_modules/convert-source-map/example/comment-to-json.js
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
var convert = require('..');
|
||||
|
||||
var json = convert
|
||||
.fromComment('//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
|
||||
.toJSON();
|
||||
|
||||
var modified = convert
|
||||
.fromComment('//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
|
||||
.setProperty('sources', [ 'CONSOLE.LOG("HI");' ])
|
||||
.toJSON();
|
||||
|
||||
console.log(json);
|
||||
console.log(modified);
|
||||
140
node_modules/accord/node_modules/convert-source-map/index.js
generated
vendored
Normal file
140
node_modules/accord/node_modules/convert-source-map/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
'use strict';
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
var commentRx = /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/mg;
|
||||
var mapFileCommentRx =
|
||||
//Example (Extra space between slashes added to solve Safari bug. Exclude space in production):
|
||||
// / /# sourceMappingURL=foo.js.map /*# sourceMappingURL=foo.js.map */
|
||||
/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg
|
||||
|
||||
function decodeBase64(base64) {
|
||||
return new Buffer(base64, 'base64').toString();
|
||||
}
|
||||
|
||||
function stripComment(sm) {
|
||||
return sm.split(',').pop();
|
||||
}
|
||||
|
||||
function readFromFileMap(sm, dir) {
|
||||
// NOTE: this will only work on the server since it attempts to read the map file
|
||||
|
||||
mapFileCommentRx.lastIndex = 0;
|
||||
var r = mapFileCommentRx.exec(sm);
|
||||
|
||||
// for some odd reason //# .. captures in 1 and /* .. */ in 2
|
||||
var filename = r[1] || r[2];
|
||||
var filepath = path.resolve(dir, filename);
|
||||
|
||||
try {
|
||||
return fs.readFileSync(filepath, 'utf8');
|
||||
} catch (e) {
|
||||
throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e);
|
||||
}
|
||||
}
|
||||
|
||||
function Converter (sm, opts) {
|
||||
opts = opts || {};
|
||||
|
||||
if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir);
|
||||
if (opts.hasComment) sm = stripComment(sm);
|
||||
if (opts.isEncoded) sm = decodeBase64(sm);
|
||||
if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm);
|
||||
|
||||
this.sourcemap = sm;
|
||||
}
|
||||
|
||||
Converter.prototype.toJSON = function (space) {
|
||||
return JSON.stringify(this.sourcemap, null, space);
|
||||
};
|
||||
|
||||
Converter.prototype.toBase64 = function () {
|
||||
var json = this.toJSON();
|
||||
return new Buffer(json).toString('base64');
|
||||
};
|
||||
|
||||
Converter.prototype.toComment = function (options) {
|
||||
var base64 = this.toBase64();
|
||||
var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
|
||||
return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
|
||||
};
|
||||
|
||||
// returns copy instead of original
|
||||
Converter.prototype.toObject = function () {
|
||||
return JSON.parse(this.toJSON());
|
||||
};
|
||||
|
||||
Converter.prototype.addProperty = function (key, value) {
|
||||
if (this.sourcemap.hasOwnProperty(key)) throw new Error('property %s already exists on the sourcemap, use set property instead');
|
||||
return this.setProperty(key, value);
|
||||
};
|
||||
|
||||
Converter.prototype.setProperty = function (key, value) {
|
||||
this.sourcemap[key] = value;
|
||||
return this;
|
||||
};
|
||||
|
||||
Converter.prototype.getProperty = function (key) {
|
||||
return this.sourcemap[key];
|
||||
};
|
||||
|
||||
exports.fromObject = function (obj) {
|
||||
return new Converter(obj);
|
||||
};
|
||||
|
||||
exports.fromJSON = function (json) {
|
||||
return new Converter(json, { isJSON: true });
|
||||
};
|
||||
|
||||
exports.fromBase64 = function (base64) {
|
||||
return new Converter(base64, { isEncoded: true });
|
||||
};
|
||||
|
||||
exports.fromComment = function (comment) {
|
||||
comment = comment
|
||||
.replace(/^\/\*/g, '//')
|
||||
.replace(/\*\/$/g, '');
|
||||
|
||||
return new Converter(comment, { isEncoded: true, hasComment: true });
|
||||
};
|
||||
|
||||
exports.fromMapFileComment = function (comment, dir) {
|
||||
return new Converter(comment, { commentFileDir: dir, isFileComment: true, isJSON: true });
|
||||
};
|
||||
|
||||
// Finds last sourcemap comment in file or returns null if none was found
|
||||
exports.fromSource = function (content) {
|
||||
var m = content.match(commentRx);
|
||||
return m ? exports.fromComment(m.pop()) : null;
|
||||
};
|
||||
|
||||
// Finds last sourcemap comment in file or returns null if none was found
|
||||
exports.fromMapFileSource = function (content, dir) {
|
||||
var m = content.match(mapFileCommentRx);
|
||||
return m ? exports.fromMapFileComment(m.pop(), dir) : null;
|
||||
};
|
||||
|
||||
exports.removeComments = function (src) {
|
||||
return src.replace(commentRx, '');
|
||||
};
|
||||
|
||||
exports.removeMapFileComments = function (src) {
|
||||
return src.replace(mapFileCommentRx, '');
|
||||
};
|
||||
|
||||
exports.generateMapFileComment = function (file, options) {
|
||||
var data = 'sourceMappingURL=' + file;
|
||||
return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
|
||||
};
|
||||
|
||||
Object.defineProperty(exports, 'commentRegex', {
|
||||
get: function getCommentRegex () {
|
||||
return commentRx;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(exports, 'mapFileCommentRegex', {
|
||||
get: function getMapFileCommentRegex () {
|
||||
return mapFileCommentRx;
|
||||
}
|
||||
});
|
||||
99
node_modules/accord/node_modules/convert-source-map/package.json
generated
vendored
Normal file
99
node_modules/accord/node_modules/convert-source-map/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "convert-source-map@^1.2.0",
|
||||
"scope": null,
|
||||
"escapedName": "convert-source-map",
|
||||
"name": "convert-source-map",
|
||||
"rawSpec": "^1.2.0",
|
||||
"spec": ">=1.2.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/jose/Documents/GitHub/Mods/node_modules/accord"
|
||||
]
|
||||
],
|
||||
"_from": "convert-source-map@>=1.2.0 <2.0.0",
|
||||
"_id": "convert-source-map@1.4.0",
|
||||
"_inCache": true,
|
||||
"_location": "/accord/convert-source-map",
|
||||
"_nodeVersion": "6.7.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/convert-source-map-1.4.0.tgz_1487019816877_0.5536009217612445"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "thlorenz",
|
||||
"email": "thlorenz@gmx.de"
|
||||
},
|
||||
"_npmVersion": "2.15.11",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "convert-source-map@^1.2.0",
|
||||
"scope": null,
|
||||
"escapedName": "convert-source-map",
|
||||
"name": "convert-source-map",
|
||||
"rawSpec": "^1.2.0",
|
||||
"spec": ">=1.2.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/accord"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.4.0.tgz",
|
||||
"_shasum": "e3dad195bf61bfe13a7a3c73e9876ec14a0268f3",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "convert-source-map@^1.2.0",
|
||||
"_where": "/Users/jose/Documents/GitHub/Mods/node_modules/accord",
|
||||
"author": {
|
||||
"name": "Thorsten Lorenz",
|
||||
"email": "thlorenz@gmx.de",
|
||||
"url": "http://thlorenz.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/thlorenz/convert-source-map/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Converts a source-map from/to different formats and allows adding/changing properties.",
|
||||
"devDependencies": {
|
||||
"inline-source-map": "~0.6.2",
|
||||
"tap": "~9.0.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "e3dad195bf61bfe13a7a3c73e9876ec14a0268f3",
|
||||
"tarball": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.4.0.tgz"
|
||||
},
|
||||
"engine": {
|
||||
"node": ">=0.6"
|
||||
},
|
||||
"gitHead": "fbd66527ab7972eff199a712d8e14ebb07957865",
|
||||
"homepage": "https://github.com/thlorenz/convert-source-map",
|
||||
"keywords": [
|
||||
"convert",
|
||||
"sourcemap",
|
||||
"source",
|
||||
"map",
|
||||
"browser",
|
||||
"debug"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "thlorenz",
|
||||
"email": "thlorenz@gmx.de"
|
||||
}
|
||||
],
|
||||
"name": "convert-source-map",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/thlorenz/convert-source-map.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test/*.js --color"
|
||||
},
|
||||
"version": "1.4.0"
|
||||
}
|
||||
138
node_modules/accord/node_modules/convert-source-map/test/comment-regex.js
generated
vendored
Normal file
138
node_modules/accord/node_modules/convert-source-map/test/comment-regex.js
generated
vendored
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
'use strict';
|
||||
/*jshint asi: true */
|
||||
|
||||
var test = require('tap').test
|
||||
, generator = require('inline-source-map')
|
||||
, rx = require('..').commentRegex
|
||||
, mapFileRx = require('..').mapFileCommentRegex
|
||||
|
||||
function comment(prefix, suffix) {
|
||||
rx.lastIndex = 0;
|
||||
return rx.test(prefix + 'sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' + suffix)
|
||||
}
|
||||
|
||||
function commentWithCharSet(prefix, suffix, sep) {
|
||||
sep = sep || ':';
|
||||
rx.lastIndex = 0;
|
||||
return rx.test(prefix + 'sourceMappingURL=data:application/json;charset' + sep +'utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' + suffix)
|
||||
}
|
||||
|
||||
// Source Map v2 Tests
|
||||
test('comment regex old spec - @', function (t) {
|
||||
[
|
||||
'//@ ',
|
||||
' //@ ', // with leading space
|
||||
'\t//@ ', // with leading tab
|
||||
'//@ ', // with leading text
|
||||
'/*@ ', // multi line style
|
||||
' /*@ ', // multi line style with leading spaces
|
||||
'\t/*@ ', // multi line style with leading tab
|
||||
'/*@ ', // multi line style with leading text
|
||||
].forEach(function (x) {
|
||||
t.ok(comment(x, ''), 'matches ' + x)
|
||||
t.ok(commentWithCharSet(x, ''), 'matches ' + x + ' with charset')
|
||||
t.ok(commentWithCharSet(x, '', '='), 'matches ' + x + ' with charset')
|
||||
});
|
||||
|
||||
[
|
||||
' @// @',
|
||||
' @/* @',
|
||||
].forEach(function (x) { t.ok(!comment(x, ''), 'should not match ' + x) })
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('comment regex new spec - #', function (t) {
|
||||
[
|
||||
' //# ', // with leading spaces
|
||||
'\t//# ', // with leading tab
|
||||
'//# ', // with leading text
|
||||
'/*# ', // multi line style
|
||||
' /*# ', // multi line style with leading spaces
|
||||
'\t/*# ', // multi line style with leading tab
|
||||
'/*# ', // multi line style with leading text
|
||||
].forEach(function (x) {
|
||||
t.ok(comment(x, ''), 'matches ' + x)
|
||||
t.ok(commentWithCharSet(x, ''), 'matches ' + x + ' with charset')
|
||||
t.ok(commentWithCharSet(x, '', '='), 'matches ' + x + ' with charset')
|
||||
});
|
||||
|
||||
[
|
||||
' #// #',
|
||||
' #/* #',
|
||||
].forEach(function (x) { t.ok(!comment(x, ''), 'should not match ' + x) })
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
function mapFileCommentWrap(s1, s2) {
|
||||
mapFileRx.lastIndex = 0;
|
||||
return mapFileRx.test(s1 + 'sourceMappingURL=foo.js.map' + s2)
|
||||
}
|
||||
|
||||
test('mapFileComment regex old spec - @', function (t) {
|
||||
|
||||
[
|
||||
['//@ ', ''],
|
||||
[' //@ ', ''], // with leading spaces
|
||||
['\t//@ ', ''], // with a leading tab
|
||||
['///@ ', ''], // with a leading text
|
||||
[';//@ ', ''], // with a leading text
|
||||
['return//@ ', ''], // with a leading text
|
||||
].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) });
|
||||
|
||||
[
|
||||
[' @// @', ''],
|
||||
['var sm = "//@ ', '"'], // not inside a string
|
||||
['var sm = \'//@ ', '\''], // not inside a string
|
||||
['var sm = \' //@ ', '\''], // not inside a string
|
||||
].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) })
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('mapFileComment regex new spec - #', function (t) {
|
||||
[
|
||||
['//# ', ''],
|
||||
[' //# ', ''], // with leading space
|
||||
['\t//# ', ''], // with leading tab
|
||||
['///# ', ''], // with leading text
|
||||
[';//# ', ''], // with leading text
|
||||
['return//# ', ''], // with leading text
|
||||
].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) });
|
||||
|
||||
[
|
||||
[' #// #', ''],
|
||||
['var sm = "//# ', '"'], // not inside a string
|
||||
['var sm = \'//# ', '\''], // not inside a string
|
||||
['var sm = \' //# ', '\''], // not inside a string
|
||||
].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) })
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('mapFileComment regex /* */ old spec - @', function (t) {
|
||||
[ [ '/*@ ', '*/' ]
|
||||
, [' /*@ ', ' */ ' ] // with leading spaces
|
||||
, [ '\t/*@ ', ' \t*/\t '] // with a leading tab
|
||||
, [ 'leading string/*@ ', '*/' ] // with a leading string
|
||||
, [ '/*@ ', ' \t*/\t '] // with trailing whitespace
|
||||
].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) });
|
||||
|
||||
[ ['/*@ ', ' */ */ ' ], // not the last thing on its line
|
||||
['/*@ ', ' */ more text ' ] // not the last thing on its line
|
||||
].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) });
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('mapFileComment regex /* */ new spec - #', function (t) {
|
||||
[ [ '/*# ', '*/' ]
|
||||
, [' /*# ', ' */ ' ] // with leading spaces
|
||||
, [ '\t/*# ', ' \t*/\t '] // with a leading tab
|
||||
, [ 'leading string/*# ', '*/' ] // with a leading string
|
||||
, [ '/*# ', ' \t*/\t '] // with trailing whitespace
|
||||
].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) });
|
||||
|
||||
[ ['/*# ', ' */ */ ' ], // not the last thing on its line
|
||||
['/*# ', ' */ more text ' ] // not the last thing on its line
|
||||
].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) });
|
||||
t.end()
|
||||
})
|
||||
213
node_modules/accord/node_modules/convert-source-map/test/convert-source-map.js
generated
vendored
Normal file
213
node_modules/accord/node_modules/convert-source-map/test/convert-source-map.js
generated
vendored
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
'use strict';
|
||||
/*jshint asi: true */
|
||||
|
||||
var test = require('tap').test
|
||||
, generator = require('inline-source-map')
|
||||
, convert = require('..')
|
||||
|
||||
var gen = generator({charset:"utf-8"})
|
||||
.addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 })
|
||||
.addGeneratedMappings('bar.js', 'var a = 2;\nconsole.log(a)', { line: 23, column: 22 })
|
||||
|
||||
, base64 = gen.base64Encode()
|
||||
, comment = gen.inlineMappingUrl()
|
||||
, json = gen.toString()
|
||||
, obj = JSON.parse(json)
|
||||
|
||||
test('different formats', function (t) {
|
||||
|
||||
t.equal(convert.fromComment(comment).toComment(), comment, 'comment -> comment')
|
||||
t.equal(convert.fromComment(comment).toBase64(), base64, 'comment -> base64')
|
||||
t.equal(convert.fromComment(comment).toJSON(), json, 'comment -> json')
|
||||
t.deepEqual(convert.fromComment(comment).toObject(), obj, 'comment -> object')
|
||||
|
||||
t.equal(convert.fromBase64(base64).toBase64(), base64, 'base64 -> base64')
|
||||
t.equal(convert.fromBase64(base64).toComment(), comment, 'base64 -> comment')
|
||||
t.equal(convert.fromBase64(base64).toJSON(), json, 'base64 -> json')
|
||||
t.deepEqual(convert.fromBase64(base64).toObject(), obj, 'base64 -> object')
|
||||
|
||||
t.equal(convert.fromJSON(json).toJSON(), json, 'json -> json')
|
||||
t.equal(convert.fromJSON(json).toBase64(), base64, 'json -> base64')
|
||||
t.equal(convert.fromJSON(json).toComment(), comment, 'json -> comment')
|
||||
t.deepEqual(convert.fromJSON(json).toObject(), obj, 'json -> object')
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('to object returns a copy', function (t) {
|
||||
var c = convert.fromJSON(json)
|
||||
var o = c.toObject()
|
||||
o.version = '99';
|
||||
t.equal(c.toObject().version, 3, 'setting property on returned object does not affect original')
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('to multi-line map', function (t) {
|
||||
var c = convert.fromObject(obj);
|
||||
var s = c.toComment({ multiline: true });
|
||||
t.similar(s, /^\/\*# sourceMappingURL=.+ \*\/$/);
|
||||
t.end();
|
||||
})
|
||||
|
||||
test('to map file comment', function (t) {
|
||||
t.equal(convert.generateMapFileComment('index.js.map'), '//# sourceMappingURL=index.js.map');
|
||||
t.equal(convert.generateMapFileComment('index.css.map', { multiline: true }), '/*# sourceMappingURL=index.css.map */');
|
||||
t.end();
|
||||
})
|
||||
|
||||
test('from source', function (t) {
|
||||
var foo = [
|
||||
'function foo() {'
|
||||
, ' console.log("hello I am foo");'
|
||||
, ' console.log("who are you");'
|
||||
, '}'
|
||||
, ''
|
||||
, 'foo();'
|
||||
, ''
|
||||
].join('\n')
|
||||
, map = '//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
|
||||
, otherMap = '//# sourceMappingURL=data:application/json;charset=utf-8;base64,otherZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
|
||||
|
||||
function getComment(src) {
|
||||
var map = convert.fromSource(src);
|
||||
return map ? map.toComment() : null;
|
||||
}
|
||||
|
||||
t.equal(getComment(foo), null, 'no comment returns null')
|
||||
t.equal(getComment(foo + map), map, 'beginning of last line')
|
||||
t.equal(getComment(foo + ' ' + map), map, 'indented of last line')
|
||||
t.equal(getComment(foo + ' ' + map + '\n\n'), map, 'indented on last non empty line')
|
||||
t.equal(getComment(foo + map + '\nconsole.log("more code");\nfoo()\n'), map, 'in the middle of code')
|
||||
t.equal(getComment(foo + otherMap + '\n' + map), map, 'finds last map in source')
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('from source with a large source', function (t) {
|
||||
var foo = [
|
||||
'function foo() {'
|
||||
, ' console.log("hello I am foo");'
|
||||
, ' console.log("who are you");'
|
||||
, '}'
|
||||
, ''
|
||||
, 'foo();'
|
||||
, ''
|
||||
].join('\n')
|
||||
, map = '//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
|
||||
, otherMap = '//# sourceMappingURL=data:application/json;charset=utf-8;base64,otherZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
|
||||
|
||||
function getComment(src) {
|
||||
var map = convert.fromSource(src, true);
|
||||
return map ? map.toComment() : null;
|
||||
}
|
||||
|
||||
t.equal(getComment(foo), null, 'no comment returns null')
|
||||
t.equal(getComment(foo + map), map, 'beginning of last line')
|
||||
t.equal(getComment(foo + ' ' + map), map, 'indented of last line')
|
||||
t.equal(getComment(foo + ' ' + map + '\n\n'), map, 'indented on last non empty line')
|
||||
t.equal(getComment(foo + map + '\nconsole.log("more code");\nfoo()\n'), map, 'in the middle of code')
|
||||
t.equal(getComment(foo + otherMap + '\n' + map), map, 'finds last map in source')
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('remove comments', function (t) {
|
||||
var foo = [
|
||||
'function foo() {'
|
||||
, ' console.log("hello I am foo");'
|
||||
, ' console.log("who are you");'
|
||||
, '}'
|
||||
, ''
|
||||
, 'foo();'
|
||||
, ''
|
||||
].join('\n')
|
||||
// this one is old spec on purpose
|
||||
, map = '//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
|
||||
, otherMap = '//# sourceMappingURL=data:application/json;base64,ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
|
||||
, extraCode = '\nconsole.log("more code");\nfoo()\n'
|
||||
|
||||
t.equal(convert.removeComments(foo + map), foo, 'from last line')
|
||||
t.equal(convert.removeComments(foo + map + extraCode), foo + extraCode, 'from the middle of code')
|
||||
t.equal(convert.removeComments(foo + otherMap + extraCode + map), foo + extraCode, 'multiple comments from the middle of code')
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('remove map file comments', function (t) {
|
||||
var foo = [
|
||||
'function foo() {'
|
||||
, ' console.log("hello I am foo");'
|
||||
, ' console.log("who are you");'
|
||||
, '}'
|
||||
, ''
|
||||
, 'foo();'
|
||||
, ''
|
||||
].join('\n')
|
||||
, fileMap1 = '//# sourceMappingURL=foo.js.map'
|
||||
, fileMap2 = '/*# sourceMappingURL=foo.js.map */';
|
||||
|
||||
t.equal(convert.removeMapFileComments(foo + fileMap1), foo, '// style filemap comment')
|
||||
t.equal(convert.removeMapFileComments(foo + fileMap2), foo, '/* */ style filemap comment')
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('pretty json', function (t) {
|
||||
var mod = convert.fromJSON(json).toJSON(2)
|
||||
, expected = JSON.stringify(obj, null, 2);
|
||||
|
||||
t.equal(
|
||||
mod
|
||||
, expected
|
||||
, 'pretty prints json when space is given')
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('adding properties', function (t) {
|
||||
var mod = convert
|
||||
.fromJSON(json)
|
||||
.addProperty('foo', 'bar')
|
||||
.toJSON()
|
||||
, expected = JSON.parse(json);
|
||||
expected.foo = 'bar';
|
||||
t.equal(
|
||||
mod
|
||||
, JSON.stringify(expected)
|
||||
, 'includes added property'
|
||||
)
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('setting properties', function (t) {
|
||||
var mod = convert
|
||||
.fromJSON(json)
|
||||
.setProperty('version', '2')
|
||||
.setProperty('mappings', ';;;UACG')
|
||||
.setProperty('should add', 'this')
|
||||
.toJSON()
|
||||
, expected = JSON.parse(json);
|
||||
expected.version = '2';
|
||||
expected.mappings = ';;;UACG';
|
||||
expected['should add'] = 'this';
|
||||
t.equal(
|
||||
mod
|
||||
, JSON.stringify(expected)
|
||||
, 'includes new property and changes existing properties'
|
||||
)
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('getting properties', function (t) {
|
||||
var sm = convert.fromJSON(json)
|
||||
|
||||
t.equal(sm.getProperty('version'), 3, 'gets version')
|
||||
t.deepEqual(sm.getProperty('sources'), ['foo.js', 'bar.js'], 'gets sources')
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('return null fromSource when largeSource is true', function(t) {
|
||||
var mod = convert.fromSource('', true)
|
||||
, expected = null;
|
||||
|
||||
t.equal(
|
||||
mod
|
||||
, expected
|
||||
, 'return value should be null'
|
||||
)
|
||||
t.end()
|
||||
})
|
||||
14
node_modules/accord/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css
generated
vendored
Normal file
14
node_modules/accord/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
.header {
|
||||
background: #444;
|
||||
border: solid;
|
||||
padding: 10px;
|
||||
border-radius: 10px 5px 10px 5px;
|
||||
color: #b4b472; }
|
||||
|
||||
#main li {
|
||||
color: green;
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
font-size: 18px; }
|
||||
|
||||
//# sourceMappingURL=map-file-comment.css.map
|
||||
14
node_modules/accord/node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css
generated
vendored
Normal file
14
node_modules/accord/node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
.header {
|
||||
background: #444;
|
||||
border: solid;
|
||||
padding: 10px;
|
||||
border-radius: 10px 5px 10px 5px;
|
||||
color: #b4b472; }
|
||||
|
||||
#main li {
|
||||
color: green;
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
font-size: 18px; }
|
||||
|
||||
/*# sourceMappingURL=data:application/json;base64,ewoidmVyc2lvbiI6ICIzIiwKIm1hcHBpbmdzIjogIkFBQUEsd0JBQXlCO0VBQ3ZCLFVBQVUsRUFBRSxJQUFJO0VBQ2hCLE1BQU0sRUFBRSxLQUFLO0VBQ2IsT0FBTyxFQUFFLElBQUk7RUFDYixhQUFhLEVBQUUsaUJBQWlCO0VBQ2hDLEtBQUssRUFBRSxPQUFrQjs7QUFHM0Isd0JBQXlCO0VBQ3ZCLE9BQU8sRUFBRSxJQUFJOztBQ1RmLGdCQUFpQjtFQUNmLFVBQVUsRUFBRSxJQUFJO0VBQ2hCLEtBQUssRUFBRSxNQUFNOztBQUdmLGtCQUFtQjtFQUNqQixNQUFNLEVBQUUsSUFBSTtFQUNaLE9BQU8sRUFBRSxJQUFJO0VBQ2IsVUFBVSxFQUFFLEtBQUs7RUFDakIsYUFBYSxFQUFFLEdBQUc7RUFDbEIsS0FBSyxFQUFFLEtBQUs7O0FBRWQsa0JBQW1CO0VBQ2pCLEtBQUssRUFBRSxLQUFLOztBQUdkLG1CQUFvQjtFQUNsQixLQUFLLEVBQUUsS0FBSztFQUNaLE1BQU0sRUFBRSxJQUFJO0VBQ1osT0FBTyxFQUFFLElBQUk7RUFDYixTQUFTLEVBQUUsSUFBSSIsCiJzb3VyY2VzIjogWyIuL2NsaWVudC9zYXNzL2NvcmUuc2NzcyIsIi4vY2xpZW50L3Nhc3MvbWFpbi5zY3NzIl0sCiJmaWxlIjogIm1hcC1maWxlLWNvbW1lbnQuY3NzIgp9 */
|
||||
14
node_modules/accord/node_modules/convert-source-map/test/fixtures/map-file-comment.css
generated
vendored
Normal file
14
node_modules/accord/node_modules/convert-source-map/test/fixtures/map-file-comment.css
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
.header {
|
||||
background: #444;
|
||||
border: solid;
|
||||
padding: 10px;
|
||||
border-radius: 10px 5px 10px 5px;
|
||||
color: #b4b472; }
|
||||
|
||||
#main li {
|
||||
color: green;
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
font-size: 18px; }
|
||||
|
||||
/*# sourceMappingURL=map-file-comment.css.map */
|
||||
6
node_modules/accord/node_modules/convert-source-map/test/fixtures/map-file-comment.css.map
generated
vendored
Normal file
6
node_modules/accord/node_modules/convert-source-map/test/fixtures/map-file-comment.css.map
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"version": "3",
|
||||
"mappings": "AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI",
|
||||
"sources": ["./client/sass/core.scss","./client/sass/main.scss"],
|
||||
"file": "map-file-comment.css"
|
||||
}
|
||||
70
node_modules/accord/node_modules/convert-source-map/test/map-file-comment.js
generated
vendored
Normal file
70
node_modules/accord/node_modules/convert-source-map/test/map-file-comment.js
generated
vendored
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
'use strict';
|
||||
/*jshint asi: true */
|
||||
|
||||
var test = require('tap').test
|
||||
, rx = require('..')
|
||||
, fs = require('fs')
|
||||
, convert = require('..')
|
||||
|
||||
test('\nresolving a "/*# sourceMappingURL=map-file-comment.css.map*/" style comment inside a given css content', function (t) {
|
||||
var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment.css', 'utf8')
|
||||
var conv = convert.fromMapFileSource(css, __dirname + '/fixtures');
|
||||
var sm = conv.toObject();
|
||||
|
||||
t.deepEqual(
|
||||
sm.sources
|
||||
, [ './client/sass/core.scss',
|
||||
'./client/sass/main.scss' ]
|
||||
, 'resolves paths of original sources'
|
||||
)
|
||||
|
||||
t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file')
|
||||
t.equal(
|
||||
sm.mappings
|
||||
, 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI'
|
||||
, 'includes mappings'
|
||||
)
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('\nresolving a "//# sourceMappingURL=map-file-comment.css.map" style comment inside a given css content', function (t) {
|
||||
var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment-double-slash.css', 'utf8')
|
||||
var conv = convert.fromMapFileSource(css, __dirname + '/fixtures');
|
||||
var sm = conv.toObject();
|
||||
|
||||
t.deepEqual(
|
||||
sm.sources
|
||||
, [ './client/sass/core.scss',
|
||||
'./client/sass/main.scss' ]
|
||||
, 'resolves paths of original sources'
|
||||
)
|
||||
|
||||
t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file')
|
||||
t.equal(
|
||||
sm.mappings
|
||||
, 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI'
|
||||
, 'includes mappings'
|
||||
)
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('\nresolving a /*# sourceMappingURL=data:application/json;base64,... */ style comment inside a given css content', function(t) {
|
||||
var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment-inline.css', 'utf8')
|
||||
var conv = convert.fromSource(css, __dirname + '/fixtures')
|
||||
var sm = conv.toObject()
|
||||
|
||||
t.deepEqual(
|
||||
sm.sources
|
||||
, [ './client/sass/core.scss',
|
||||
'./client/sass/main.scss' ]
|
||||
, 'resolves paths of original sources'
|
||||
)
|
||||
|
||||
t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file')
|
||||
t.equal(
|
||||
sm.mappings
|
||||
, 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI'
|
||||
, 'includes mappings'
|
||||
)
|
||||
t.end()
|
||||
})
|
||||
47
node_modules/accord/node_modules/lodash.defaults/LICENSE
generated
vendored
Normal file
47
node_modules/accord/node_modules/lodash.defaults/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
Copyright and related rights for sample code are waived via CC0. Sample
|
||||
code is defined as all source code displayed within the prose of the
|
||||
documentation.
|
||||
|
||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
====
|
||||
|
||||
Files located in the node_modules and vendor directories are externally
|
||||
maintained libraries used by this software which have their own
|
||||
licenses; we recommend you read them, as their terms may differ from the
|
||||
terms above.
|
||||
18
node_modules/accord/node_modules/lodash.defaults/README.md
generated
vendored
Normal file
18
node_modules/accord/node_modules/lodash.defaults/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# lodash.defaults v4.2.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.defaults` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.defaults
|
||||
```
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var defaults = require('lodash.defaults');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#defaults) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.defaults) for more details.
|
||||
668
node_modules/accord/node_modules/lodash.defaults/index.js
generated
vendored
Normal file
668
node_modules/accord/node_modules/lodash.defaults/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,668 @@
|
|||
/**
|
||||
* lodash (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var argsTag = '[object Arguments]',
|
||||
funcTag = '[object Function]',
|
||||
genTag = '[object GeneratorFunction]';
|
||||
|
||||
/** Used to detect unsigned integer values. */
|
||||
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
||||
|
||||
/**
|
||||
* A faster alternative to `Function#apply`, this function invokes `func`
|
||||
* with the `this` binding of `thisArg` and the arguments of `args`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to invoke.
|
||||
* @param {*} thisArg The `this` binding of `func`.
|
||||
* @param {Array} args The arguments to invoke `func` with.
|
||||
* @returns {*} Returns the result of `func`.
|
||||
*/
|
||||
function apply(func, thisArg, args) {
|
||||
switch (args.length) {
|
||||
case 0: return func.call(thisArg);
|
||||
case 1: return func.call(thisArg, args[0]);
|
||||
case 2: return func.call(thisArg, args[0], args[1]);
|
||||
case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
||||
}
|
||||
return func.apply(thisArg, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.times` without support for iteratee shorthands
|
||||
* or max array length checks.
|
||||
*
|
||||
* @private
|
||||
* @param {number} n The number of times to invoke `iteratee`.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Array} Returns the array of results.
|
||||
*/
|
||||
function baseTimes(n, iteratee) {
|
||||
var index = -1,
|
||||
result = Array(n);
|
||||
|
||||
while (++index < n) {
|
||||
result[index] = iteratee(index);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/** Built-in value references. */
|
||||
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeMax = Math.max;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `_.defaults` to customize its `_.assignIn` use.
|
||||
*
|
||||
* @private
|
||||
* @param {*} objValue The destination value.
|
||||
* @param {*} srcValue The source value.
|
||||
* @param {string} key The key of the property to assign.
|
||||
* @param {Object} object The parent object of `objValue`.
|
||||
* @returns {*} Returns the value to assign.
|
||||
*/
|
||||
function assignInDefaults(objValue, srcValue, key, object) {
|
||||
if (objValue === undefined ||
|
||||
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
|
||||
return srcValue;
|
||||
}
|
||||
return objValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
||||
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* for equality comparisons.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to modify.
|
||||
* @param {string} key The key of the property to assign.
|
||||
* @param {*} value The value to assign.
|
||||
*/
|
||||
function assignValue(object, key, value) {
|
||||
var objValue = object[key];
|
||||
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
||||
(value === undefined && !(key in object))) {
|
||||
object[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function baseKeysIn(object) {
|
||||
if (!isObject(object)) {
|
||||
return nativeKeysIn(object);
|
||||
}
|
||||
var isProto = isPrototype(object),
|
||||
result = [];
|
||||
|
||||
for (var key in object) {
|
||||
if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to apply a rest parameter to.
|
||||
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseRest(func, start) {
|
||||
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
||||
return function() {
|
||||
var args = arguments,
|
||||
index = -1,
|
||||
length = nativeMax(args.length - start, 0),
|
||||
array = Array(length);
|
||||
|
||||
while (++index < length) {
|
||||
array[index] = args[start + index];
|
||||
}
|
||||
index = -1;
|
||||
var otherArgs = Array(start + 1);
|
||||
while (++index < start) {
|
||||
otherArgs[index] = args[index];
|
||||
}
|
||||
otherArgs[start] = array;
|
||||
return apply(func, this, otherArgs);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies properties of `source` to `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy properties from.
|
||||
* @param {Array} props The property identifiers to copy.
|
||||
* @param {Object} [object={}] The object to copy properties to.
|
||||
* @param {Function} [customizer] The function to customize copied values.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copyObject(source, props, object, customizer) {
|
||||
object || (object = {});
|
||||
|
||||
var index = -1,
|
||||
length = props.length;
|
||||
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
|
||||
var newValue = customizer
|
||||
? customizer(object[key], source[key], key, object, source)
|
||||
: undefined;
|
||||
|
||||
assignValue(object, key, newValue === undefined ? source[key] : newValue);
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function like `_.assign`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} assigner The function to assign values.
|
||||
* @returns {Function} Returns the new assigner function.
|
||||
*/
|
||||
function createAssigner(assigner) {
|
||||
return baseRest(function(object, sources) {
|
||||
var index = -1,
|
||||
length = sources.length,
|
||||
customizer = length > 1 ? sources[length - 1] : undefined,
|
||||
guard = length > 2 ? sources[2] : undefined;
|
||||
|
||||
customizer = (assigner.length > 3 && typeof customizer == 'function')
|
||||
? (length--, customizer)
|
||||
: undefined;
|
||||
|
||||
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
||||
customizer = length < 3 ? undefined : customizer;
|
||||
length = 1;
|
||||
}
|
||||
object = Object(object);
|
||||
while (++index < length) {
|
||||
var source = sources[index];
|
||||
if (source) {
|
||||
assigner(object, source, index, customizer);
|
||||
}
|
||||
}
|
||||
return object;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a valid array-like index.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||||
*/
|
||||
function isIndex(value, length) {
|
||||
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||
return !!length &&
|
||||
(typeof value == 'number' || reIsUint.test(value)) &&
|
||||
(value > -1 && value % 1 == 0 && value < length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given arguments are from an iteratee call.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The potential iteratee value argument.
|
||||
* @param {*} index The potential iteratee index or key argument.
|
||||
* @param {*} object The potential iteratee object argument.
|
||||
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
||||
* else `false`.
|
||||
*/
|
||||
function isIterateeCall(value, index, object) {
|
||||
if (!isObject(object)) {
|
||||
return false;
|
||||
}
|
||||
var type = typeof index;
|
||||
if (type == 'number'
|
||||
? (isArrayLike(object) && isIndex(index, object.length))
|
||||
: (type == 'string' && index in object)
|
||||
) {
|
||||
return eq(object[index], value);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is likely a prototype object.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
||||
*/
|
||||
function isPrototype(value) {
|
||||
var Ctor = value && value.constructor,
|
||||
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
||||
|
||||
return value === proto;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is like
|
||||
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* except that it includes inherited enumerable properties.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function nativeKeysIn(object) {
|
||||
var result = [];
|
||||
if (object != null) {
|
||||
for (var key in Object(object)) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to compare.
|
||||
* @param {*} other The other value to compare.
|
||||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'a': 1 };
|
||||
* var other = { 'a': 1 };
|
||||
*
|
||||
* _.eq(object, object);
|
||||
* // => true
|
||||
*
|
||||
* _.eq(object, other);
|
||||
* // => false
|
||||
*
|
||||
* _.eq('a', 'a');
|
||||
* // => true
|
||||
*
|
||||
* _.eq('a', Object('a'));
|
||||
* // => false
|
||||
*
|
||||
* _.eq(NaN, NaN);
|
||||
* // => true
|
||||
*/
|
||||
function eq(value, other) {
|
||||
return value === other || (value !== value && other !== other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is likely an `arguments` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isArguments(function() { return arguments; }());
|
||||
* // => true
|
||||
*
|
||||
* _.isArguments([1, 2, 3]);
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as an `Array` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isArray([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isArray(document.body.children);
|
||||
* // => false
|
||||
*
|
||||
* _.isArray('abc');
|
||||
* // => false
|
||||
*
|
||||
* _.isArray(_.noop);
|
||||
* // => false
|
||||
*/
|
||||
var isArray = Array.isArray;
|
||||
|
||||
/**
|
||||
* Checks if `value` is array-like. A value is considered array-like if it's
|
||||
* not a function and has a `value.length` that's an integer greater than or
|
||||
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isArrayLike([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isArrayLike(document.body.children);
|
||||
* // => true
|
||||
*
|
||||
* _.isArrayLike('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isArrayLike(_.noop);
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.isArrayLike` except that it also checks if `value`
|
||||
* is an object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isArrayLikeObject([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isArrayLikeObject(document.body.children);
|
||||
* // => true
|
||||
*
|
||||
* _.isArrayLikeObject('abc');
|
||||
* // => false
|
||||
*
|
||||
* _.isArrayLikeObject(_.noop);
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLikeObject(value) {
|
||||
return isObjectLike(value) && isArrayLike(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Function` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isFunction(_);
|
||||
* // => true
|
||||
*
|
||||
* _.isFunction(/abc/);
|
||||
* // => false
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
* // => true
|
||||
*
|
||||
* _.isLength(Number.MIN_VALUE);
|
||||
* // => false
|
||||
*
|
||||
* _.isLength(Infinity);
|
||||
* // => false
|
||||
*
|
||||
* _.isLength('3');
|
||||
* // => false
|
||||
*/
|
||||
function isLength(value) {
|
||||
return typeof value == 'number' &&
|
||||
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObject({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObject([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(_.noop);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObject(value) {
|
||||
var type = typeof value;
|
||||
return !!value && (type == 'object' || type == 'function');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
||||
* and has a `typeof` result of "object".
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObjectLike({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike(_.noop);
|
||||
* // => false
|
||||
*
|
||||
* _.isObjectLike(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.assignIn` except that it accepts `customizer`
|
||||
* which is invoked to produce the assigned values. If `customizer` returns
|
||||
* `undefined`, assignment is handled by the method instead. The `customizer`
|
||||
* is invoked with five arguments: (objValue, srcValue, key, object, source).
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @alias extendWith
|
||||
* @category Object
|
||||
* @param {Object} object The destination object.
|
||||
* @param {...Object} sources The source objects.
|
||||
* @param {Function} [customizer] The function to customize assigned values.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @see _.assignWith
|
||||
* @example
|
||||
*
|
||||
* function customizer(objValue, srcValue) {
|
||||
* return _.isUndefined(objValue) ? srcValue : objValue;
|
||||
* }
|
||||
*
|
||||
* var defaults = _.partialRight(_.assignInWith, customizer);
|
||||
*
|
||||
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
||||
* // => { 'a': 1, 'b': 2 }
|
||||
*/
|
||||
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
|
||||
copyObject(source, keysIn(source), object, customizer);
|
||||
});
|
||||
|
||||
/**
|
||||
* Assigns own and inherited enumerable string keyed properties of source
|
||||
* objects to the destination object for all destination properties that
|
||||
* resolve to `undefined`. Source objects are applied from left to right.
|
||||
* Once a property is set, additional values of the same property are ignored.
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Object
|
||||
* @param {Object} object The destination object.
|
||||
* @param {...Object} [sources] The source objects.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @see _.defaultsDeep
|
||||
* @example
|
||||
*
|
||||
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
||||
* // => { 'a': 1, 'b': 2 }
|
||||
*/
|
||||
var defaults = baseRest(function(args) {
|
||||
args.push(undefined, assignInDefaults);
|
||||
return apply(assignInWith, undefined, args);
|
||||
});
|
||||
|
||||
/**
|
||||
* Creates an array of the own and inherited enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.0.0
|
||||
* @category Object
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.a = 1;
|
||||
* this.b = 2;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.c = 3;
|
||||
*
|
||||
* _.keysIn(new Foo);
|
||||
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
||||
*/
|
||||
function keysIn(object) {
|
||||
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
||||
}
|
||||
|
||||
module.exports = defaults;
|
||||
113
node_modules/accord/node_modules/lodash.defaults/package.json
generated
vendored
Normal file
113
node_modules/accord/node_modules/lodash.defaults/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "lodash.defaults@^4.0.1",
|
||||
"scope": null,
|
||||
"escapedName": "lodash.defaults",
|
||||
"name": "lodash.defaults",
|
||||
"rawSpec": "^4.0.1",
|
||||
"spec": ">=4.0.1 <5.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/jose/Documents/GitHub/Mods/node_modules/accord"
|
||||
]
|
||||
],
|
||||
"_from": "lodash.defaults@>=4.0.1 <5.0.0",
|
||||
"_id": "lodash.defaults@4.2.0",
|
||||
"_inCache": true,
|
||||
"_location": "/accord/lodash.defaults",
|
||||
"_nodeVersion": "4.4.7",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/lodash.defaults-4.2.0.tgz_1471109872209_0.6277233152650297"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "jdalton",
|
||||
"email": "john.david.dalton@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.15.10",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "lodash.defaults@^4.0.1",
|
||||
"scope": null,
|
||||
"escapedName": "lodash.defaults",
|
||||
"name": "lodash.defaults",
|
||||
"rawSpec": "^4.0.1",
|
||||
"spec": ">=4.0.1 <5.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/accord"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
|
||||
"_shasum": "d09178716ffea4dde9e5fb7b37f6f0802274580c",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "lodash.defaults@^4.0.1",
|
||||
"_where": "/Users/jose/Documents/GitHub/Mods/node_modules/accord",
|
||||
"author": {
|
||||
"name": "John-David Dalton",
|
||||
"email": "john.david.dalton@gmail.com",
|
||||
"url": "http://allyoucanleet.com/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/lodash/lodash/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "John-David Dalton",
|
||||
"email": "john.david.dalton@gmail.com",
|
||||
"url": "http://allyoucanleet.com/"
|
||||
},
|
||||
{
|
||||
"name": "Blaine Bublitz",
|
||||
"email": "blaine.bublitz@gmail.com",
|
||||
"url": "https://github.com/phated"
|
||||
},
|
||||
{
|
||||
"name": "Mathias Bynens",
|
||||
"email": "mathias@qiwi.be",
|
||||
"url": "https://mathiasbynens.be/"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"description": "The lodash method `_.defaults` exported as a module.",
|
||||
"devDependencies": {},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "d09178716ffea4dde9e5fb7b37f6f0802274580c",
|
||||
"tarball": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz"
|
||||
},
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"keywords": [
|
||||
"lodash-modularized",
|
||||
"defaults"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "jdalton",
|
||||
"email": "john.david.dalton@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "mathias",
|
||||
"email": "mathias@qiwi.be"
|
||||
},
|
||||
{
|
||||
"name": "phated",
|
||||
"email": "blaine@iceddev.com"
|
||||
}
|
||||
],
|
||||
"name": "lodash.defaults",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/lodash/lodash.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
|
||||
},
|
||||
"version": "4.2.0"
|
||||
}
|
||||
15
node_modules/accord/node_modules/semver/LICENSE
generated
vendored
Normal file
15
node_modules/accord/node_modules/semver/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
350
node_modules/accord/node_modules/semver/README.md
generated
vendored
Normal file
350
node_modules/accord/node_modules/semver/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,350 @@
|
|||
semver(1) -- The semantic versioner for npm
|
||||
===========================================
|
||||
|
||||
## Usage
|
||||
|
||||
$ npm install semver
|
||||
$ node
|
||||
var semver = require('semver')
|
||||
|
||||
semver.valid('1.2.3') // '1.2.3'
|
||||
semver.valid('a.b.c') // null
|
||||
semver.clean(' =v1.2.3 ') // '1.2.3'
|
||||
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
|
||||
semver.gt('1.2.3', '9.8.7') // false
|
||||
semver.lt('1.2.3', '9.8.7') // true
|
||||
|
||||
As a command-line utility:
|
||||
|
||||
$ semver -h
|
||||
|
||||
SemVer 5.1.0
|
||||
|
||||
A JavaScript implementation of the http://semver.org/ specification
|
||||
Copyright Isaac Z. Schlueter
|
||||
|
||||
Usage: semver [options] <version> [<version> [...]]
|
||||
Prints valid versions sorted by SemVer precedence
|
||||
|
||||
Options:
|
||||
-r --range <range>
|
||||
Print versions that match the specified range.
|
||||
|
||||
-i --increment [<level>]
|
||||
Increment a version by the specified level. Level can
|
||||
be one of: major, minor, patch, premajor, preminor,
|
||||
prepatch, or prerelease. Default level is 'patch'.
|
||||
Only one version may be specified.
|
||||
|
||||
--preid <identifier>
|
||||
Identifier to be used to prefix premajor, preminor,
|
||||
prepatch or prerelease version increments.
|
||||
|
||||
-l --loose
|
||||
Interpret versions and ranges loosely
|
||||
|
||||
Program exits successfully if any valid version satisfies
|
||||
all supplied ranges, and prints all satisfying versions.
|
||||
|
||||
If no satisfying versions are found, then exits failure.
|
||||
|
||||
Versions are printed in ascending order, so supplying
|
||||
multiple versions to the utility will just sort them.
|
||||
|
||||
## Versions
|
||||
|
||||
A "version" is described by the `v2.0.0` specification found at
|
||||
<http://semver.org/>.
|
||||
|
||||
A leading `"="` or `"v"` character is stripped off and ignored.
|
||||
|
||||
## Ranges
|
||||
|
||||
A `version range` is a set of `comparators` which specify versions
|
||||
that satisfy the range.
|
||||
|
||||
A `comparator` is composed of an `operator` and a `version`. The set
|
||||
of primitive `operators` is:
|
||||
|
||||
* `<` Less than
|
||||
* `<=` Less than or equal to
|
||||
* `>` Greater than
|
||||
* `>=` Greater than or equal to
|
||||
* `=` Equal. If no operator is specified, then equality is assumed,
|
||||
so this operator is optional, but MAY be included.
|
||||
|
||||
For example, the comparator `>=1.2.7` would match the versions
|
||||
`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
|
||||
or `1.1.0`.
|
||||
|
||||
Comparators can be joined by whitespace to form a `comparator set`,
|
||||
which is satisfied by the **intersection** of all of the comparators
|
||||
it includes.
|
||||
|
||||
A range is composed of one or more comparator sets, joined by `||`. A
|
||||
version matches a range if and only if every comparator in at least
|
||||
one of the `||`-separated comparator sets is satisfied by the version.
|
||||
|
||||
For example, the range `>=1.2.7 <1.3.0` would match the versions
|
||||
`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
|
||||
or `1.1.0`.
|
||||
|
||||
The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
|
||||
`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
|
||||
|
||||
### Prerelease Tags
|
||||
|
||||
If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
|
||||
it will only be allowed to satisfy comparator sets if at least one
|
||||
comparator with the same `[major, minor, patch]` tuple also has a
|
||||
prerelease tag.
|
||||
|
||||
For example, the range `>1.2.3-alpha.3` would be allowed to match the
|
||||
version `1.2.3-alpha.7`, but it would *not* be satisfied by
|
||||
`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
|
||||
than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
|
||||
range only accepts prerelease tags on the `1.2.3` version. The
|
||||
version `3.4.5` *would* satisfy the range, because it does not have a
|
||||
prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
|
||||
|
||||
The purpose for this behavior is twofold. First, prerelease versions
|
||||
frequently are updated very quickly, and contain many breaking changes
|
||||
that are (by the author's design) not yet fit for public consumption.
|
||||
Therefore, by default, they are excluded from range matching
|
||||
semantics.
|
||||
|
||||
Second, a user who has opted into using a prerelease version has
|
||||
clearly indicated the intent to use *that specific* set of
|
||||
alpha/beta/rc versions. By including a prerelease tag in the range,
|
||||
the user is indicating that they are aware of the risk. However, it
|
||||
is still not appropriate to assume that they have opted into taking a
|
||||
similar risk on the *next* set of prerelease versions.
|
||||
|
||||
#### Prerelease Identifiers
|
||||
|
||||
The method `.inc` takes an additional `identifier` string argument that
|
||||
will append the value of the string as a prerelease identifier:
|
||||
|
||||
```javascript
|
||||
> semver.inc('1.2.3', 'prerelease', 'beta')
|
||||
'1.2.4-beta.0'
|
||||
```
|
||||
|
||||
command-line example:
|
||||
|
||||
```shell
|
||||
$ semver 1.2.3 -i prerelease --preid beta
|
||||
1.2.4-beta.0
|
||||
```
|
||||
|
||||
Which then can be used to increment further:
|
||||
|
||||
```shell
|
||||
$ semver 1.2.4-beta.0 -i prerelease
|
||||
1.2.4-beta.1
|
||||
```
|
||||
|
||||
### Advanced Range Syntax
|
||||
|
||||
Advanced range syntax desugars to primitive comparators in
|
||||
deterministic ways.
|
||||
|
||||
Advanced ranges may be combined in the same way as primitive
|
||||
comparators using white space or `||`.
|
||||
|
||||
#### Hyphen Ranges `X.Y.Z - A.B.C`
|
||||
|
||||
Specifies an inclusive set.
|
||||
|
||||
* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the first version in the inclusive
|
||||
range, then the missing pieces are replaced with zeroes.
|
||||
|
||||
* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the second version in the
|
||||
inclusive range, then all versions that start with the supplied parts
|
||||
of the tuple are accepted, but nothing that would be greater than the
|
||||
provided tuple parts.
|
||||
|
||||
* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
|
||||
* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
|
||||
|
||||
#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
|
||||
|
||||
Any of `X`, `x`, or `*` may be used to "stand in" for one of the
|
||||
numeric values in the `[major, minor, patch]` tuple.
|
||||
|
||||
* `*` := `>=0.0.0` (Any version satisfies)
|
||||
* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
|
||||
* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
|
||||
|
||||
A partial version range is treated as an X-Range, so the special
|
||||
character is in fact optional.
|
||||
|
||||
* `""` (empty string) := `*` := `>=0.0.0`
|
||||
* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
|
||||
* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
|
||||
|
||||
#### Tilde Ranges `~1.2.3` `~1.2` `~1`
|
||||
|
||||
Allows patch-level changes if a minor version is specified on the
|
||||
comparator. Allows minor-level changes if not.
|
||||
|
||||
* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
|
||||
* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
|
||||
* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
|
||||
* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
|
||||
* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
|
||||
* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
|
||||
* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
|
||||
#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
|
||||
|
||||
Allows changes that do not modify the left-most non-zero digit in the
|
||||
`[major, minor, patch]` tuple. In other words, this allows patch and
|
||||
minor updates for versions `1.0.0` and above, patch updates for
|
||||
versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
|
||||
|
||||
Many authors treat a `0.x` version as if the `x` were the major
|
||||
"breaking-change" indicator.
|
||||
|
||||
Caret ranges are ideal when an author may make breaking changes
|
||||
between `0.2.4` and `0.3.0` releases, which is a common practice.
|
||||
However, it presumes that there will *not* be breaking changes between
|
||||
`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
|
||||
additive (but non-breaking), according to commonly observed practices.
|
||||
|
||||
* `^1.2.3` := `>=1.2.3 <2.0.0`
|
||||
* `^0.2.3` := `>=0.2.3 <0.3.0`
|
||||
* `^0.0.3` := `>=0.0.3 <0.0.4`
|
||||
* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
|
||||
`0.0.3` version *only* will be allowed, if they are greater than or
|
||||
equal to `beta`. So, `0.0.3-pr.2` would be allowed.
|
||||
|
||||
When parsing caret ranges, a missing `patch` value desugars to the
|
||||
number `0`, but will allow flexibility within that value, even if the
|
||||
major and minor versions are both `0`.
|
||||
|
||||
* `^1.2.x` := `>=1.2.0 <2.0.0`
|
||||
* `^0.0.x` := `>=0.0.0 <0.1.0`
|
||||
* `^0.0` := `>=0.0.0 <0.1.0`
|
||||
|
||||
A missing `minor` and `patch` values will desugar to zero, but also
|
||||
allow flexibility within those values, even if the major version is
|
||||
zero.
|
||||
|
||||
* `^1.x` := `>=1.0.0 <2.0.0`
|
||||
* `^0.x` := `>=0.0.0 <1.0.0`
|
||||
|
||||
### Range Grammar
|
||||
|
||||
Putting all this together, here is a Backus-Naur grammar for ranges,
|
||||
for the benefit of parser authors:
|
||||
|
||||
```bnf
|
||||
range-set ::= range ( logical-or range ) *
|
||||
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
|
||||
range ::= hyphen | simple ( ' ' simple ) * | ''
|
||||
hyphen ::= partial ' - ' partial
|
||||
simple ::= primitive | partial | tilde | caret
|
||||
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
|
||||
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
|
||||
xr ::= 'x' | 'X' | '*' | nr
|
||||
nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
|
||||
tilde ::= '~' partial
|
||||
caret ::= '^' partial
|
||||
qualifier ::= ( '-' pre )? ( '+' build )?
|
||||
pre ::= parts
|
||||
build ::= parts
|
||||
parts ::= part ( '.' part ) *
|
||||
part ::= nr | [-0-9A-Za-z]+
|
||||
```
|
||||
|
||||
## Functions
|
||||
|
||||
All methods and classes take a final `loose` boolean argument that, if
|
||||
true, will be more forgiving about not-quite-valid semver strings.
|
||||
The resulting output will always be 100% strict, of course.
|
||||
|
||||
Strict-mode Comparators and Ranges will be strict about the SemVer
|
||||
strings that they parse.
|
||||
|
||||
* `valid(v)`: Return the parsed version, or null if it's not valid.
|
||||
* `inc(v, release)`: Return the version incremented by the release
|
||||
type (`major`, `premajor`, `minor`, `preminor`, `patch`,
|
||||
`prepatch`, or `prerelease`), or null if it's not valid
|
||||
* `premajor` in one call will bump the version up to the next major
|
||||
version and down to a prerelease of that major version.
|
||||
`preminor`, and `prepatch` work the same way.
|
||||
* If called from a non-prerelease version, the `prerelease` will work the
|
||||
same as `prepatch`. It increments the patch version, then makes a
|
||||
prerelease. If the input version is already a prerelease it simply
|
||||
increments it.
|
||||
* `prerelease(v)`: Returns an array of prerelease components, or null
|
||||
if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
|
||||
* `major(v)`: Return the major version number.
|
||||
* `minor(v)`: Return the minor version number.
|
||||
* `patch(v)`: Return the patch version number.
|
||||
|
||||
### Comparison
|
||||
|
||||
* `gt(v1, v2)`: `v1 > v2`
|
||||
* `gte(v1, v2)`: `v1 >= v2`
|
||||
* `lt(v1, v2)`: `v1 < v2`
|
||||
* `lte(v1, v2)`: `v1 <= v2`
|
||||
* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
|
||||
even if they're not the exact same string. You already know how to
|
||||
compare strings.
|
||||
* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
|
||||
* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
|
||||
the corresponding function above. `"==="` and `"!=="` do simple
|
||||
string comparison, but are included for completeness. Throws if an
|
||||
invalid comparison string is provided.
|
||||
* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
|
||||
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
|
||||
* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
|
||||
in descending order when passed to `Array.sort()`.
|
||||
* `diff(v1, v2)`: Returns difference between two versions by the release type
|
||||
(`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
|
||||
or null if the versions are the same.
|
||||
|
||||
|
||||
### Ranges
|
||||
|
||||
* `validRange(range)`: Return the valid range or null if it's not valid
|
||||
* `satisfies(version, range)`: Return true if the version satisfies the
|
||||
range.
|
||||
* `maxSatisfying(versions, range)`: Return the highest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minSatisfying(versions, range)`: Return the lowest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `gtr(version, range)`: Return `true` if version is greater than all the
|
||||
versions possible in the range.
|
||||
* `ltr(version, range)`: Return `true` if version is less than all the
|
||||
versions possible in the range.
|
||||
* `outside(version, range, hilo)`: Return true if the version is outside
|
||||
the bounds of the range in either the high or low direction. The
|
||||
`hilo` argument must be either the string `'>'` or `'<'`. (This is
|
||||
the function called by `gtr` and `ltr`.)
|
||||
|
||||
Note that, since ranges may be non-contiguous, a version might not be
|
||||
greater than a range, less than a range, *or* satisfy a range! For
|
||||
example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
|
||||
until `2.0.0`, so the version `1.2.10` would not be greater than the
|
||||
range (because `2.0.1` satisfies, which is higher), nor less than the
|
||||
range (since `1.2.8` satisfies, which is lower), and it also does not
|
||||
satisfy the range.
|
||||
|
||||
If you want to know if a version satisfies or does not satisfy a
|
||||
range, use the `satisfies(version, range)` function.
|
||||
133
node_modules/accord/node_modules/semver/bin/semver
generated
vendored
Executable file
133
node_modules/accord/node_modules/semver/bin/semver
generated
vendored
Executable file
|
|
@ -0,0 +1,133 @@
|
|||
#!/usr/bin/env node
|
||||
// Standalone semver comparison program.
|
||||
// Exits successfully and prints matching version(s) if
|
||||
// any supplied version is valid and passes all tests.
|
||||
|
||||
var argv = process.argv.slice(2)
|
||||
, versions = []
|
||||
, range = []
|
||||
, gt = []
|
||||
, lt = []
|
||||
, eq = []
|
||||
, inc = null
|
||||
, version = require("../package.json").version
|
||||
, loose = false
|
||||
, identifier = undefined
|
||||
, semver = require("../semver")
|
||||
, reverse = false
|
||||
|
||||
main()
|
||||
|
||||
function main () {
|
||||
if (!argv.length) return help()
|
||||
while (argv.length) {
|
||||
var a = argv.shift()
|
||||
var i = a.indexOf('=')
|
||||
if (i !== -1) {
|
||||
a = a.slice(0, i)
|
||||
argv.unshift(a.slice(i + 1))
|
||||
}
|
||||
switch (a) {
|
||||
case "-rv": case "-rev": case "--rev": case "--reverse":
|
||||
reverse = true
|
||||
break
|
||||
case "-l": case "--loose":
|
||||
loose = true
|
||||
break
|
||||
case "-v": case "--version":
|
||||
versions.push(argv.shift())
|
||||
break
|
||||
case "-i": case "--inc": case "--increment":
|
||||
switch (argv[0]) {
|
||||
case "major": case "minor": case "patch": case "prerelease":
|
||||
case "premajor": case "preminor": case "prepatch":
|
||||
inc = argv.shift()
|
||||
break
|
||||
default:
|
||||
inc = "patch"
|
||||
break
|
||||
}
|
||||
break
|
||||
case "--preid":
|
||||
identifier = argv.shift()
|
||||
break
|
||||
case "-r": case "--range":
|
||||
range.push(argv.shift())
|
||||
break
|
||||
case "-h": case "--help": case "-?":
|
||||
return help()
|
||||
default:
|
||||
versions.push(a)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
versions = versions.filter(function (v) {
|
||||
return semver.valid(v, loose)
|
||||
})
|
||||
if (!versions.length) return fail()
|
||||
if (inc && (versions.length !== 1 || range.length))
|
||||
return failInc()
|
||||
|
||||
for (var i = 0, l = range.length; i < l ; i ++) {
|
||||
versions = versions.filter(function (v) {
|
||||
return semver.satisfies(v, range[i], loose)
|
||||
})
|
||||
if (!versions.length) return fail()
|
||||
}
|
||||
return success(versions)
|
||||
}
|
||||
|
||||
function failInc () {
|
||||
console.error("--inc can only be used on a single version with no range")
|
||||
fail()
|
||||
}
|
||||
|
||||
function fail () { process.exit(1) }
|
||||
|
||||
function success () {
|
||||
var compare = reverse ? "rcompare" : "compare"
|
||||
versions.sort(function (a, b) {
|
||||
return semver[compare](a, b, loose)
|
||||
}).map(function (v) {
|
||||
return semver.clean(v, loose)
|
||||
}).map(function (v) {
|
||||
return inc ? semver.inc(v, inc, loose, identifier) : v
|
||||
}).forEach(function (v,i,_) { console.log(v) })
|
||||
}
|
||||
|
||||
function help () {
|
||||
console.log(["SemVer " + version
|
||||
,""
|
||||
,"A JavaScript implementation of the http://semver.org/ specification"
|
||||
,"Copyright Isaac Z. Schlueter"
|
||||
,""
|
||||
,"Usage: semver [options] <version> [<version> [...]]"
|
||||
,"Prints valid versions sorted by SemVer precedence"
|
||||
,""
|
||||
,"Options:"
|
||||
,"-r --range <range>"
|
||||
," Print versions that match the specified range."
|
||||
,""
|
||||
,"-i --increment [<level>]"
|
||||
," Increment a version by the specified level. Level can"
|
||||
," be one of: major, minor, patch, premajor, preminor,"
|
||||
," prepatch, or prerelease. Default level is 'patch'."
|
||||
," Only one version may be specified."
|
||||
,""
|
||||
,"--preid <identifier>"
|
||||
," Identifier to be used to prefix premajor, preminor,"
|
||||
," prepatch or prerelease version increments."
|
||||
,""
|
||||
,"-l --loose"
|
||||
," Interpret versions and ranges loosely"
|
||||
,""
|
||||
,"Program exits successfully if any valid version satisfies"
|
||||
,"all supplied ranges, and prints all satisfying versions."
|
||||
,""
|
||||
,"If no satisfying versions are found, then exits failure."
|
||||
,""
|
||||
,"Versions are printed in ascending order, so supplying"
|
||||
,"multiple versions to the utility will just sort them."
|
||||
].join("\n"))
|
||||
}
|
||||
94
node_modules/accord/node_modules/semver/package.json
generated
vendored
Normal file
94
node_modules/accord/node_modules/semver/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "semver@^5.3.0",
|
||||
"scope": null,
|
||||
"escapedName": "semver",
|
||||
"name": "semver",
|
||||
"rawSpec": "^5.3.0",
|
||||
"spec": ">=5.3.0 <6.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/jose/Documents/GitHub/Mods/node_modules/accord"
|
||||
]
|
||||
],
|
||||
"_from": "semver@>=5.3.0 <6.0.0",
|
||||
"_id": "semver@5.3.0",
|
||||
"_inCache": true,
|
||||
"_location": "/accord/semver",
|
||||
"_nodeVersion": "4.4.4",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/semver-5.3.0.tgz_1468515166602_0.9155273644719273"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
},
|
||||
"_npmVersion": "3.10.6",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "semver@^5.3.0",
|
||||
"scope": null,
|
||||
"escapedName": "semver",
|
||||
"name": "semver",
|
||||
"rawSpec": "^5.3.0",
|
||||
"spec": ">=5.3.0 <6.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/accord"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
||||
"_shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "semver@^5.3.0",
|
||||
"_where": "/Users/jose/Documents/GitHub/Mods/node_modules/accord",
|
||||
"bin": {
|
||||
"semver": "./bin/semver"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/npm/node-semver/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "The semantic version parser used by npm.",
|
||||
"devDependencies": {
|
||||
"tap": "^2.0.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f",
|
||||
"tarball": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz"
|
||||
},
|
||||
"files": [
|
||||
"bin",
|
||||
"range.bnf",
|
||||
"semver.js"
|
||||
],
|
||||
"gitHead": "d21444a0658224b152ce54965d02dbe0856afb84",
|
||||
"homepage": "https://github.com/npm/node-semver#readme",
|
||||
"license": "ISC",
|
||||
"main": "semver.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "isaacs",
|
||||
"email": "isaacs@npmjs.com"
|
||||
},
|
||||
{
|
||||
"name": "othiym23",
|
||||
"email": "ogd@aoaioxxysz.net"
|
||||
}
|
||||
],
|
||||
"name": "semver",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/npm/node-semver.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"version": "5.3.0"
|
||||
}
|
||||
16
node_modules/accord/node_modules/semver/range.bnf
generated
vendored
Normal file
16
node_modules/accord/node_modules/semver/range.bnf
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
range-set ::= range ( logical-or range ) *
|
||||
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
|
||||
range ::= hyphen | simple ( ' ' simple ) * | ''
|
||||
hyphen ::= partial ' - ' partial
|
||||
simple ::= primitive | partial | tilde | caret
|
||||
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
|
||||
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
|
||||
xr ::= 'x' | 'X' | '*' | nr
|
||||
nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
|
||||
tilde ::= '~' partial
|
||||
caret ::= '^' partial
|
||||
qualifier ::= ( '-' pre )? ( '+' build )?
|
||||
pre ::= parts
|
||||
build ::= parts
|
||||
parts ::= part ( '.' part ) *
|
||||
part ::= nr | [-0-9A-Za-z]+
|
||||
1203
node_modules/accord/node_modules/semver/semver.js
generated
vendored
Normal file
1203
node_modules/accord/node_modules/semver/semver.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue