Comparing version 1.1.4 to 1.1.5
@@ -129,7 +129,7 @@ var templating = require('./templating'), | ||
} | ||
module.filename = module.filename.replace(base+'/', '').replace(base,''); | ||
module.filename = module.filename.replace(base+'/', ''); | ||
module.filename.indexOf('/') > 0 && ( module.filename = module.filename.replace(base, '') ); | ||
module.id = module.filename.replace(/\.js$/,''); | ||
@@ -259,4 +259,5 @@ if(!error) modules.push(module); | ||
if(pkg.manifest.main){ | ||
mainModulePath = path.join(pkg.wd, pkg.manifest.main+'.js'); | ||
mainModulePath = path.join(pkg.wd, pkg.manifest.main + ( /\.js$/.test(pkg.manifest.main) ? '' : '.js' )); | ||
pkg.main = pkg.modulesDict[mainModulePath]; | ||
pkg.mainModuleId = pkg.main.name; | ||
} | ||
@@ -278,4 +279,7 @@ | ||
function createPkg(wd, manifest, parentPkg, options){ | ||
!options && ( options = {} ); | ||
var pkg = { | ||
'id':options && options.id && options.id() || templating.idGenerator(), | ||
'id':options.id && options.id() || ( options.id = templating.idGenerator() ), | ||
'dependencies':undefined, | ||
@@ -282,0 +286,0 @@ 'dirs':manifest.directories || {}, |
@@ -32,2 +32,3 @@ var logging = require('./logging'), | ||
logging.info('All packages has been built successfully.'); | ||
renderWrapper(options, callback); | ||
@@ -34,0 +35,0 @@ }); |
{ | ||
"name":"one", | ||
"version":"1.1.4", | ||
"version":"1.1.5", | ||
"description":"Transform NodeJS packages into single stand-alone script files.", | ||
@@ -5,0 +5,0 @@ "author":"Azer Koculu <azer@kodfabrik.com>", |
@@ -10,3 +10,3 @@ OneJS is a command-line utility for converting CommonJS packages to single, stand-alone JavaScript | ||
* **Reliable code generation** OneJS doesn't change your source code. It only generates a container environment that simply emulates NodeJS environment. | ||
* **Unobtrusive Code** The source code OneJS generates wraps projects into a single, isolated JS object. | ||
* **Unobtrusive Code** OneJS generates puts all content into an isolated JS object. | ||
@@ -13,0 +13,0 @@ ### Examples |
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
7
44337
47
1122