Comparing version 2.0.10 to 2.0.11
@@ -77,4 +77,12 @@ var modules = require('./modules'), | ||
function save(filename, callback){ | ||
options.target = filename; | ||
function save(/* [filename,] callback */){ | ||
var callback; | ||
if( typeof arguments[0] == 'string' ) { | ||
options.target = arguments[0]; | ||
callback = arguments[1]; | ||
} else { | ||
callback = options.callback = arguments[0]; | ||
} | ||
main(manifest, options, callback || function(error){ | ||
@@ -81,0 +89,0 @@ if(error) throw error; |
@@ -47,2 +47,10 @@ var path = require('path'), | ||
if(options.callback) { | ||
if( Object.keys(bundle).length == 1 | ||
&& bundle['[stdout]'] ) return callback(undefined, bundle['[stdout]']); | ||
return callback(undefined, bundle); | ||
} | ||
var output = bundle['[stdout]']; | ||
@@ -49,0 +57,0 @@ |
{ | ||
"name": "one", | ||
"version": "2.0.10", | ||
"version": "2.0.11", | ||
"description": "Transform NodeJS packages into single stand-alone script files.", | ||
@@ -5,0 +5,0 @@ "author": "Azer Koculu <azer@kodfabrik.com>", |
69443
1686