Removed all build modules

pull/2/head
Louis Chatriot 12 years ago
parent 8660fc8b42
commit ad14d4adcf
  1. 1
      .gitignore
  2. 80
      browser-version/build.js

1
.gitignore vendored

@ -16,3 +16,4 @@ workspace
node_modules
browser-version/src
browser-version/node_modules

@ -4,49 +4,57 @@
var fs = require('fs-extra')
, path = require('path')
, child_process = require('child_process')
, async = require('async')
, rimraf = require('rimraf')
//, rimraf = require('rimraf')
, srcContents = fs.readdirSync(path.join(__dirname, 'src'))
, toCopy = ['lib', 'node_modules']
;
async.waterfall([
function (cb) {
console.log("Removing contents of the src directory");
srcContents.forEach(function (item) {
var fullPath = path.join(__dirname, 'src', item);
rimraf.sync(fullPath);
});
return cb();
}
, function (cb) {
console.log("Copying source files");
async.eachSeries(toCopy, function (item, _cb) {
fs.copy(path.join(__dirname, '..', item), path.join(__dirname, 'src', item), _cb);
}, cb);
}
, function (cb) {
console.log("Copying browser specific files");
async.eachSeries(fs.readdirSync(path.join(__dirname, 'browser-specific')), function (item, _cb) {
fs.copy(path.join(__dirname, 'browser-specific', item), path.join(__dirname, 'src', item), _cb);
}, cb);
}
], function (err) {
if (err) {
console.log("Error during build");
console.log(err);
} else {
console.log("Build finished with success");
}
child_process.exec('npm install rimraf', function (err, stdout, stderr) {
console.log("==============");
console.log(stdout);
});
//async.waterfall([
//function (cb) {
//console.log("Removing contents of the src directory");
//srcContents.forEach(function (item) {
//var fullPath = path.join(__dirname, 'src', item);
//rimraf.sync(fullPath);
//});
//return cb();
//}
//, function (cb) {
//console.log("Copying source files");
//async.eachSeries(toCopy, function (item, _cb) {
//fs.copy(path.join(__dirname, '..', item), path.join(__dirname, 'src', item), _cb);
//}, cb);
//}
//, function (cb) {
//console.log("Copying browser specific files");
//async.eachSeries(fs.readdirSync(path.join(__dirname, 'browser-specific')), function (item, _cb) {
//fs.copy(path.join(__dirname, 'browser-specific', item), path.join(__dirname, 'src', item), _cb);
//}, cb);
//}
//], function (err) {
//if (err) {
//console.log("Error during build");
//console.log(err);
//} else {
//console.log("Build finished with success");
//}
//});

Loading…
Cancel
Save