Skip to content

Instantly share code, notes, and snippets.

@kompiro
Created Nov 25, 2011
Embed
What would you like to do?
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