Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- proper working sans client argument in build/add/remove

- bump version
  • Loading branch information...
commit c8f6ba04e70fb47d8026b7dd04e6541535b83962 1 parent 587cfeb
Dustin Diaz ded authored
13 lib/ender.file.js
View
@@ -58,9 +58,8 @@ var fs = require('fs')
});
}
- , processComment: function (source, context) {
- source = (source && source.toString()) ||
- '/*!\n' +
+ , processComment: function (context, source) {
+ source = '/*!\n' +
' * Ender: open module JavaScript framework\n' +
' * copyright Dustin Diaz & Jacob Thornton 2011 (@ded @fat)\n' +
' * https://ender.no.de\n' +
@@ -222,8 +221,10 @@ var fs = require('fs')
FILE.constructSource(packagePath, packageJSON.main, function (source) {
//CONSTRUCT BRIDGE
FILE.constructBridge(packagePath, packageJSON.ender, function (content) {
- if (!i) {
- source = FILE.processComment(source, context);
+ if (!j) {
+ // this is some straight up ¬33† b®u†å¬î†¥
+ source = source.toString().replace(/\/\*[\s\S]+?\*\//g, '');
+ source = FILE.processComment(context) + source;
} else {
if (!options.noop) {
if (!packageJSON.ender) {
@@ -236,7 +237,7 @@ var fs = require('fs')
result[j] = source;
if (packages.length == ++i) {
if (options.noop) {
- result.unshift(FILE.processComment(false, context))
+ result.unshift(FILE.processComment(context))
}
callback && callback(result);
}
2  lib/ender.get.js
View
@@ -13,7 +13,7 @@ module.exports = {
},
special: function (options) {
- return options.noop ? [] : ['ender-js'];
+ return options.sans || options.noop ? [] : ['ender-js'];
}
, buildHistory: function (file, callback) {
4 lib/ender.js
View
@@ -56,7 +56,7 @@ var colors = require('colors')
ENDER.get.buildHistory(options.use, function (cmd) {
ENDER.cmd.process(cmd, function (type, _modules, _options) {
options = ENDER.util.merge(_options, options);
- packages = ENDER.util.unique(ENDER.get.special(options).concat(packages));
+ !options.sans && (packages = ENDER.util.unique(ENDER.get.special(options).concat(packages)));
_modules = ENDER.util.unique(ENDER.get.special(options).concat(_modules));
ENDER.file.constructDependencyTree(_modules, 'node_modules', function (tree) {
ENDER.file.flattenDependencyTree(tree, null, function (__modules, __uniquePackageNames) {
@@ -95,7 +95,7 @@ var colors = require('colors')
ENDER.cmd.process(cmd, function(type, _modules, _options) {
options = ENDER.util.merge(_options, options);
packages = packages.map(function (item) { return item.replace(/@.*/, ''); });
- packages = ENDER.util.unique(ENDER.get.special(options).concat(packages));
+ !options.sans && (packages = ENDER.util.unique(ENDER.get.special(options).concat(packages)));
_modules = ENDER.util.unique(ENDER.get.special(options).concat(_modules));
var modules = ENDER.util.unique(ENDER.get.special(options).concat(_modules))
, queue = ENDER.util.reject(ENDER.util.unique(ENDER.util.keep(
2  package.json
View
@@ -1,7 +1,7 @@
{
"name": "ender",
"description": "next level JavaScript modules",
- "version": "0.4.1",
+ "version": "0.4.2",
"authors": ["Dustin Diaz <@ded>", "Jacob Thornton <@fat>"],
"keywords": ["ender", "modules", "builder", "framework", "packager"],
"main": "./index.js",
Please sign in to comment.
Something went wrong with that request. Please try again.