diff --git a/build.js b/build.js index d23df0f..fdbf145 100755 --- a/build.js +++ b/build.js @@ -1,9 +1,13 @@ #!/usr/bin/env node var fs = require('fs'); +var path = require('path'); var querystring = require('querystring'); var child_process = require('child_process'); +var browserify = path.join('node_modules', '.bin', 'browserify'); +var coffee = path.join('node_modules', '.bin', 'coffee'); + function run(command, callback) { console.log(command); child_process.exec(command, callback); @@ -11,7 +15,7 @@ function run(command, callback) { // Use browserify to package up source-map-support.js fs.writeFileSync('.temp.js', 'sourceMapSupport = require("./source-map-support");'); -run('node_modules/browserify/bin/cmd.js .temp.js', function(error, stdout) { +run(browserify + ' .temp.js', function(error, stdout) { if (error) throw error; // Wrap the code so it works both as a normal