start on using browserify
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
var mdeps = require("module-deps"),
|
||||
through = require("through"),
|
||||
async = require("async");
|
||||
|
||||
function bundle (input, complete) {
|
||||
|
||||
async.waterfall([
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
function resolveDeps () {
|
||||
|
||||
var deps = [];
|
||||
|
||||
mdeps(input).pipe(through(function (chunk) {
|
||||
deps.push(chunk);
|
||||
}, function () {
|
||||
|
||||
for (var i = deps.length; i--;) {
|
||||
console.log(deps);
|
||||
}
|
||||
|
||||
}));
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
||||
module.exports = bundle;
|
||||
+21
-15
@@ -1,17 +1,17 @@
|
||||
var async = require("async"),
|
||||
outcome = require("outcome"),
|
||||
mkdirp = require("mkdirp"),
|
||||
request = require("request"),
|
||||
path = require("path"),
|
||||
fs = require("fs"),
|
||||
ncp = require("ncp").ncp,
|
||||
ProgressBar = require("progress"),
|
||||
child_process = require("child_process"),
|
||||
glob = require("glob"),
|
||||
sardines = require("sardines"),
|
||||
os = require("os"),
|
||||
targz = require('tar.gz'),
|
||||
spawn = child_process.spawn;
|
||||
var async = require("async"),
|
||||
outcome = require("outcome"),
|
||||
mkdirp = require("mkdirp"),
|
||||
request = require("request"),
|
||||
path = require("path"),
|
||||
fs = require("fs"),
|
||||
ncp = require("ncp").ncp,
|
||||
ProgressBar = require("progress"),
|
||||
child_process = require("child_process"),
|
||||
glob = require("glob"),
|
||||
bundle = require("./bundle"),
|
||||
os = require("os"),
|
||||
targz = require('tar.gz'),
|
||||
spawn = child_process.spawn;
|
||||
|
||||
|
||||
var _log = require("./log"),
|
||||
@@ -40,10 +40,16 @@ exports.compile = function (options, complete) {
|
||||
* bundle the application into one script
|
||||
*/
|
||||
|
||||
function combineProject (nc, next) {
|
||||
/*function combineProject (nc, next) {
|
||||
nodeCompiler = nc;
|
||||
_log("bundle %s", options.input);
|
||||
sardines({ entries: [options.input], platform: "node" }, next);
|
||||
},*/
|
||||
|
||||
function combineProject (nc, next) {
|
||||
nodeCompiler = nc;
|
||||
_log("bundle %s", options.input);
|
||||
bundle(options.input, next);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
+3
-1
@@ -21,7 +21,9 @@
|
||||
"colors": "~0.6.2",
|
||||
"glob": "~3.2.9",
|
||||
"progress": "~1.1.3",
|
||||
"tar.gz": "0.1.1"
|
||||
"tar.gz": "0.1.1",
|
||||
"module-deps": "^3.5.4",
|
||||
"through": "^2.3.4"
|
||||
},
|
||||
"preferGlobal": "true",
|
||||
"bin": {
|
||||
|
||||
Reference in New Issue
Block a user