Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

log linking & copying

  • Loading branch information...
commit 3c1ab759355f78feda812d0f990c0429ccdab079 1 parent bd22e2c
Craig Jefferds authored
Showing with 25 additions and 6 deletions.
  1. +6 −2 lib/checkout/fs.js
  2. +19 −4 lib/link/javascript.js
8 lib/checkout/fs.js
View
@@ -16,9 +16,13 @@ exports.test = function(ops)
}
exports.checkout = function(ops, callback)
-{
+{
+ console.log('Copying local repository to tmp directory');
+
exec('cp -r ' + ops.source + '/* ' + ops.output, function(err, result)
- {
+ {
+ console.log('Done copying');
+
callback(err, result);
});
}
23 lib/link/javascript.js
View
@@ -1,5 +1,5 @@
-var fs = require('fs'),
-exec = require('child_process').exec;
+var fs = require('fs'),
+spawn = require('child_process').spawn;
exports.test = function(ops)
{
@@ -33,7 +33,22 @@ exports.test = function(ops)
exports.link = function(ops, callback)
{
- console.log("Linking with npm: " + ops.appDir);
+ console.log("Linking with npm: " + ops.appDir);
+
+ var npm = spawn('sudo',['npm','install','--unsafe-perm'], { cwd: ops.appDir });
+
+
+ npm.stdout.on('data', function(data)
+ {
+ console.log(data.toString());
+ });
+
+ npm.stderr.on('data', function(data)
+ {
+ console.error(data.toString());
+ });
+
+ npm.on('exit', callback);
- exec('sudo npm install --unsafe-perm', { cwd: ops.appDir }, callback);
+ // exec('sudo npm install --unsafe-perm', { cwd: ops.appDir }, callback);
}
Please sign in to comment.
Something went wrong with that request. Please try again.