diff --git a/src/bundle.js b/src/bundle.js index 21e7c30..5939ee4 100644 --- a/src/bundle.js +++ b/src/bundle.js @@ -141,8 +141,10 @@ exports.bundleFiles = function (startpath, args, files, opts, next) // TODO should not be public, // relied on by debug push code path -exports.tarCode = function (dirpath, pushdir, next) +exports.tarCode = function (dirpath, options, next) { + options = Object(options); + var fstr = fstream.Reader({path: dirpath, type: "Directory"}) fstr.basename = ''; @@ -169,7 +171,7 @@ exports.tarCode = function (dirpath, pushdir, next) hasIndex = true; } }).on('end', function () { - if (!hasIndex) { + if (!hasIndex && !options.node) { logs.err('Command line generated bundle without an /_start.js file. Please report this error.'); process.exit(1); } diff --git a/src/index.js b/src/index.js index 67f5ab8..0a61b6d 100644 --- a/src/index.js +++ b/src/index.js @@ -14,6 +14,8 @@ exports.Tessel = tessel_usb.Tessel; exports.findTessel = tessel_usb.findTessel; exports.listDevices = tessel_usb.listDevices; exports.bundleFiles = bundle.bundleFiles; +exports.tarCode = bundle.tarCode; +exports.logs = require('./logs'); require('./commands'); require('./script');