Skip to content

Instantly share code, notes, and snippets.

@kompiro
Created November 25, 2011 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kompiro/1393801 to your computer and use it in GitHub Desktop.
Save kompiro/1393801 to your computer and use it in GitHub Desktop.
node-ninjaでcoffeescriptを使うの術
{
"name": "Your App Name"
, "version": "0.0.1"
, "dependencies" : {
"coffee-script": ">= 1.1.2"
}
, "devDependencies" : {
"npm" : "latest"
}
, "scripts" : {
"start" : "coffee app.coffee"
}
}
var npm = require('npm')
var conf = {}
npm.load(conf, function (er) {
if (er) return handlError(er);
npm.commands.start([], function (er, data) {
if (er) return commandFailed(er);
});
npm.on("log", function (message) {
})
}
)
function commandFailed(er){
console.log(er);
}
function handleError(er){
console.log(er);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment