Comparing version 1.7.2 to 1.7.3
@@ -75,5 +75,8 @@ var readFile = require('fs').readFile, | ||
var treeName = templating.makeVariableName(pkg.name), | ||
pkgs = flattenPkgTree(pkg); | ||
pkgs = flattenPkgTree(pkg), | ||
sortedPkgs = pkgs.sort(function(a, b){ | ||
return a.name[0] > b.name[0]; | ||
}); | ||
map( npmpackage.bind(undefined, treeName, options), pkgs, function(error, packages){ | ||
map( npmpackage.bind(undefined, treeName, options), sortedPkgs, function(error, packages){ | ||
if(error){ | ||
@@ -106,5 +109,9 @@ callback(error); | ||
var partials = {}; | ||
var partials = {}, | ||
modules = pkg.modules, | ||
sortedModules = modules.sort(function(a, b){ | ||
return a.filename[0] > b.filename[0]; | ||
}); | ||
map( npmmodule.bind(undefined, pkg, treeName, options), pkg.modules, function(error, modules){ | ||
map( npmmodule.bind(undefined, pkg, treeName, options), sortedModules, function(error, modules){ | ||
@@ -111,0 +118,0 @@ if(error) { |
{ | ||
"name":"one", | ||
"version":"1.7.2", | ||
"version":"1.7.3", | ||
"description":"Transform NodeJS packages into single stand-alone script files.", | ||
@@ -5,0 +5,0 @@ "author":"Azer Koculu <azer@kodfabrik.com>", |
@@ -247,2 +247,51 @@ var exampleProject = (function(global, undefined){ | ||
})(this); | ||
exampleProject.pkg(1, function(parents){ | ||
return { | ||
'id':8, | ||
'name':'assert', | ||
'main':undefined, | ||
'mainModuleId':'assert', | ||
'modules':[], | ||
'parents':parents | ||
}; | ||
}); | ||
exampleProject.module(8, function(/* parent */){ | ||
return { | ||
'id': 'assert', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer, console, process, require, undefined){ | ||
exports.assert = true; | ||
} | ||
}; | ||
}); | ||
exampleProject.pkg(1, function(parents){ | ||
return { | ||
'id':3, | ||
'name':'dependency', | ||
'main':undefined, | ||
'mainModuleId':'f', | ||
'modules':[], | ||
'parents':parents | ||
}; | ||
}); | ||
exampleProject.module(3, function(/* parent */){ | ||
return { | ||
'id': 'f', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer, console, process, require, undefined){ | ||
require('subdependency'); | ||
exports.parent = module.parent; | ||
exports.f = true; | ||
} | ||
}; | ||
}); | ||
exampleProject.module(3, function(/* parent */){ | ||
return { | ||
'id': 'g', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer, console, process, require, undefined){ | ||
exports.g = true; | ||
} | ||
}; | ||
}); | ||
exampleProject.pkg(function(parents){ | ||
@@ -278,6 +327,6 @@ return { | ||
return { | ||
'id': 'web', | ||
'id': 'b', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer, console, process, require, undefined){ | ||
console.log('this module will be working for only web browsers'); | ||
exports.b = true; | ||
} | ||
@@ -288,6 +337,6 @@ }; | ||
return { | ||
'id': 'b', | ||
'id': 'web', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer, console, process, require, undefined){ | ||
exports.b = true; | ||
console.log('this module will be working for only web browsers'); | ||
} | ||
@@ -315,8 +364,8 @@ }; | ||
}); | ||
exampleProject.pkg(1, function(parents){ | ||
exampleProject.pkg(3, function(parents){ | ||
return { | ||
'id':3, | ||
'name':'dependency', | ||
'id':5, | ||
'name':'fruits', | ||
'main':undefined, | ||
'mainModuleId':'f', | ||
'mainModuleId':'index', | ||
'modules':[], | ||
@@ -326,19 +375,17 @@ 'parents':parents | ||
}); | ||
exampleProject.module(3, function(/* parent */){ | ||
exampleProject.module(5, function(/* parent */){ | ||
return { | ||
'id': 'g', | ||
'id': 'index', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer, console, process, require, undefined){ | ||
exports.g = true; | ||
module.exports = require('./lib/fruits'); | ||
} | ||
}; | ||
}); | ||
exampleProject.module(3, function(/* parent */){ | ||
exampleProject.module(5, function(/* parent */){ | ||
return { | ||
'id': 'f', | ||
'id': 'lib/fruits', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer, console, process, require, undefined){ | ||
require('subdependency'); | ||
exports.parent = module.parent; | ||
exports.f = true; | ||
module.exports = ['apple', 'orange']; | ||
} | ||
@@ -367,30 +414,2 @@ }; | ||
}); | ||
exampleProject.pkg(3, function(parents){ | ||
return { | ||
'id':5, | ||
'name':'fruits', | ||
'main':undefined, | ||
'mainModuleId':'index', | ||
'modules':[], | ||
'parents':parents | ||
}; | ||
}); | ||
exampleProject.module(5, function(/* parent */){ | ||
return { | ||
'id': 'lib/fruits', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer, console, process, require, undefined){ | ||
module.exports = ['apple', 'orange']; | ||
} | ||
}; | ||
}); | ||
exampleProject.module(5, function(/* parent */){ | ||
return { | ||
'id': 'index', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer, console, process, require, undefined){ | ||
module.exports = require('./lib/fruits'); | ||
} | ||
}; | ||
}); | ||
exampleProject.pkg(3, 1, function(parents){ | ||
@@ -466,21 +485,2 @@ return { | ||
}); | ||
exampleProject.pkg(1, function(parents){ | ||
return { | ||
'id':8, | ||
'name':'assert', | ||
'main':undefined, | ||
'mainModuleId':'assert', | ||
'modules':[], | ||
'parents':parents | ||
}; | ||
}); | ||
exampleProject.module(8, function(/* parent */){ | ||
return { | ||
'id': 'assert', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer, console, process, require, undefined){ | ||
exports.assert = true; | ||
} | ||
}; | ||
}); | ||
if(typeof module != 'undefined' && module.exports ){ | ||
@@ -487,0 +487,0 @@ module.exports = exampleProject; |
@@ -227,2 +227,51 @@ var exampleProject = (function(global, undefined){ | ||
})(this); | ||
exampleProject.pkg(1, function(parents){ | ||
return { | ||
'id':8, | ||
'name':'assert', | ||
'main':undefined, | ||
'mainModuleId':'assert', | ||
'modules':[], | ||
'parents':parents | ||
}; | ||
}); | ||
exampleProject.module(8, function(/* parent */){ | ||
return { | ||
'id': 'assert', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
exports.assert = true; | ||
} | ||
}; | ||
}); | ||
exampleProject.pkg(1, function(parents){ | ||
return { | ||
'id':3, | ||
'name':'dependency', | ||
'main':undefined, | ||
'mainModuleId':'f', | ||
'modules':[], | ||
'parents':parents | ||
}; | ||
}); | ||
exampleProject.module(3, function(/* parent */){ | ||
return { | ||
'id': 'f', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
require('subdependency'); | ||
exports.parent = module.parent; | ||
exports.f = true; | ||
} | ||
}; | ||
}); | ||
exampleProject.module(3, function(/* parent */){ | ||
return { | ||
'id': 'g', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
exports.g = true; | ||
} | ||
}; | ||
}); | ||
exampleProject.pkg(function(parents){ | ||
@@ -258,6 +307,6 @@ return { | ||
return { | ||
'id': 'web', | ||
'id': 'b', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
console.log('this module will be working for only web browsers'); | ||
exports.b = true; | ||
} | ||
@@ -268,6 +317,6 @@ }; | ||
return { | ||
'id': 'b', | ||
'id': 'web', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
exports.b = true; | ||
console.log('this module will be working for only web browsers'); | ||
} | ||
@@ -295,8 +344,8 @@ }; | ||
}); | ||
exampleProject.pkg(1, function(parents){ | ||
exampleProject.pkg(3, function(parents){ | ||
return { | ||
'id':3, | ||
'name':'dependency', | ||
'id':5, | ||
'name':'fruits', | ||
'main':undefined, | ||
'mainModuleId':'f', | ||
'mainModuleId':'index', | ||
'modules':[], | ||
@@ -306,19 +355,17 @@ 'parents':parents | ||
}); | ||
exampleProject.module(3, function(/* parent */){ | ||
exampleProject.module(5, function(/* parent */){ | ||
return { | ||
'id': 'g', | ||
'id': 'index', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
exports.g = true; | ||
module.exports = require('./lib/fruits'); | ||
} | ||
}; | ||
}); | ||
exampleProject.module(3, function(/* parent */){ | ||
exampleProject.module(5, function(/* parent */){ | ||
return { | ||
'id': 'f', | ||
'id': 'lib/fruits', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
require('subdependency'); | ||
exports.parent = module.parent; | ||
exports.f = true; | ||
module.exports = ['apple', 'orange']; | ||
} | ||
@@ -347,30 +394,2 @@ }; | ||
}); | ||
exampleProject.pkg(3, function(parents){ | ||
return { | ||
'id':5, | ||
'name':'fruits', | ||
'main':undefined, | ||
'mainModuleId':'index', | ||
'modules':[], | ||
'parents':parents | ||
}; | ||
}); | ||
exampleProject.module(5, function(/* parent */){ | ||
return { | ||
'id': 'lib/fruits', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
module.exports = ['apple', 'orange']; | ||
} | ||
}; | ||
}); | ||
exampleProject.module(5, function(/* parent */){ | ||
return { | ||
'id': 'index', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
module.exports = require('./lib/fruits'); | ||
} | ||
}; | ||
}); | ||
exampleProject.pkg(3, 1, function(parents){ | ||
@@ -446,21 +465,2 @@ return { | ||
}); | ||
exampleProject.pkg(1, function(parents){ | ||
return { | ||
'id':8, | ||
'name':'assert', | ||
'main':undefined, | ||
'mainModuleId':'assert', | ||
'modules':[], | ||
'parents':parents | ||
}; | ||
}); | ||
exampleProject.module(8, function(/* parent */){ | ||
return { | ||
'id': 'assert', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
exports.assert = true; | ||
} | ||
}; | ||
}); | ||
if(typeof module != 'undefined' && module.exports ){ | ||
@@ -467,0 +467,0 @@ module.exports = exampleProject; |
126
tmp/built.js
@@ -231,2 +231,51 @@ var exampleProject = (function(global, undefined){ | ||
})(this); | ||
exampleProject.pkg(1, function(parents){ | ||
return { | ||
'id':7, | ||
'name':'assert', | ||
'main':undefined, | ||
'mainModuleId':'assert', | ||
'modules':[], | ||
'parents':parents | ||
}; | ||
}); | ||
exampleProject.module(7, function(/* parent */){ | ||
return { | ||
'id': 'assert', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
exports.assert = true; | ||
} | ||
}; | ||
}); | ||
exampleProject.pkg(1, function(parents){ | ||
return { | ||
'id':2, | ||
'name':'dependency', | ||
'main':undefined, | ||
'mainModuleId':'f', | ||
'modules':[], | ||
'parents':parents | ||
}; | ||
}); | ||
exampleProject.module(2, function(/* parent */){ | ||
return { | ||
'id': 'f', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
require('subdependency'); | ||
exports.parent = module.parent; | ||
exports.f = true; | ||
} | ||
}; | ||
}); | ||
exampleProject.module(2, function(/* parent */){ | ||
return { | ||
'id': 'g', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
exports.g = true; | ||
} | ||
}; | ||
}); | ||
exampleProject.pkg(function(parents){ | ||
@@ -262,6 +311,6 @@ return { | ||
return { | ||
'id': 'web', | ||
'id': 'b', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
console.log('this module will be working for only web browsers'); | ||
exports.b = true; | ||
} | ||
@@ -272,15 +321,15 @@ }; | ||
return { | ||
'id': 'b', | ||
'id': 'web', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
exports.b = true; | ||
console.log('this module will be working for only web browsers'); | ||
} | ||
}; | ||
}); | ||
exampleProject.pkg(1, function(parents){ | ||
exampleProject.pkg(2, function(parents){ | ||
return { | ||
'id':2, | ||
'name':'dependency', | ||
'id':4, | ||
'name':'fruits', | ||
'main':undefined, | ||
'mainModuleId':'f', | ||
'mainModuleId':'index', | ||
'modules':[], | ||
@@ -290,19 +339,17 @@ 'parents':parents | ||
}); | ||
exampleProject.module(2, function(/* parent */){ | ||
exampleProject.module(4, function(/* parent */){ | ||
return { | ||
'id': 'g', | ||
'id': 'index', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
exports.g = true; | ||
module.exports = require('./lib/fruits'); | ||
} | ||
}; | ||
}); | ||
exampleProject.module(2, function(/* parent */){ | ||
exampleProject.module(4, function(/* parent */){ | ||
return { | ||
'id': 'f', | ||
'id': 'lib/fruits', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
require('subdependency'); | ||
exports.parent = module.parent; | ||
exports.f = true; | ||
module.exports = ['apple', 'orange']; | ||
} | ||
@@ -331,30 +378,2 @@ }; | ||
}); | ||
exampleProject.pkg(2, function(parents){ | ||
return { | ||
'id':4, | ||
'name':'fruits', | ||
'main':undefined, | ||
'mainModuleId':'index', | ||
'modules':[], | ||
'parents':parents | ||
}; | ||
}); | ||
exampleProject.module(4, function(/* parent */){ | ||
return { | ||
'id': 'lib/fruits', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
module.exports = ['apple', 'orange']; | ||
} | ||
}; | ||
}); | ||
exampleProject.module(4, function(/* parent */){ | ||
return { | ||
'id': 'index', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
module.exports = require('./lib/fruits'); | ||
} | ||
}; | ||
}); | ||
exampleProject.pkg(2, 1, function(parents){ | ||
@@ -430,21 +449,2 @@ return { | ||
}); | ||
exampleProject.pkg(1, function(parents){ | ||
return { | ||
'id':7, | ||
'name':'assert', | ||
'main':undefined, | ||
'mainModuleId':'assert', | ||
'modules':[], | ||
'parents':parents | ||
}; | ||
}); | ||
exampleProject.module(7, function(/* parent */){ | ||
return { | ||
'id': 'assert', | ||
'pkg': arguments[0], | ||
'wrapper': function(module, exports, global, Buffer,process, require, undefined){ | ||
exports.assert = true; | ||
} | ||
}; | ||
}); | ||
if(typeof module != 'undefined' && module.exports ){ | ||
@@ -451,0 +451,0 @@ module.exports = exampleProject; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81899
2466