-
Quickire my first node module
Today I decided to jump in a write my first node module. It’s not something really useful but might save time to some people.
The idea is:
every node.js thing starts that way:
var foo = require('foo'); var bar = require('./bar');I decided to replace all that by:
var q = quickire({'foo':'foo', 'bar':'./bar'});and then you use it just before except you put q. everywhere:
var q.foo.aFunction(arg1,arg2);My next step is to change it even more so that you just have to call quickire with a json and you can forget about the “q.” this would just make everything less painful IMHO.
Doing that package managed me to get started with mocha tests, travis and other things and all these things are awesome! I used Anders Janmyr “writing a node module” tutorial and I recommend it to everybody!
-
-
nickthejam likes this
-
lahab posted this
-
