--
This commit is contained in:
parent
24f3d27984
commit
6b60015c02
9588 changed files with 1149251 additions and 49 deletions
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);
|
||||
Loading…
Reference in a new issue