I was inspired by the talk that Thorsten Lorenz gave at NodePDX yesterday, and I've been making an effort to take his advice.
Even using pkginit, it was still annoying to have to create the same old .gitignore file, and duplicate portions of the package.json in the README.md.
That's why I created module-driven. I encourage you to give it a try. Here's what a run-through looks like using my template:
$ npm install -g module-driven
$ moduleDriven easy-peasie
description: Get going, fast!
$ find easy-peasie
easy-peasie
easy-peasie/.gitignore
easy-peasie/package.json
easy-peasie/README.md
easy-peasie/test
$ cat easy-peasie/package.json
{
"name": "easy-peasie",
"description": "Get going, fast!",
"version": "0.0.1",
"repository": {
"url": "git://github.com/curious-attempt-bunny/easy-peasie.git"
},
"main": "index.js",
"scripts": {
"test": "tap test/*.js"
},
"dependencies": {
},
"devDependencies": {
"tap": "~0.4.3",
"tape": "~1.0.2"
}
}
By way of explanation here's the contents of my ~/.content/module-driven folder:
$ cat ~/.config/module-driven/package.json.mdtmpl
{
"name": "{{name}}",
"description": "{{description}}",
"version": "0.0.1",
"repository": {
"url": "git://github.com/curious-attempt-bunny/{{name}}.git"
},
"main": "index.js",
"scripts": {
"test": "tap test/*.js"
},
"dependencies": {
},
"devDependencies": {
"tap": "~0.4.3",
"tape": "~1.0.2"
}
}
May 18, 2013
Module Driven in node.js
Posted
5:39 PM
0
comments
Links to this post
Labels: nodejs
May 17, 2013
nodepdx 2013: Building a Multiplayer World for Pillow Pets
[Lanyrd notes] Charlie sketched out their approach to implementing Pillow Pets World.
Posted
10:49 AM
0
comments
Links to this post
nodepdx 2013: minecraft.js
Posted
10:06 AM
0
comments
Links to this post
2013 nodepdx: Module Driven Development
- Everything in your lib folder is a candidate for a node module. Publish it!
- Every module is a function (module.exports = function (..) { .. })!
- Hoogle is the inspirations for a library of functions
- Put each function in a separate file (it makes coupling code harder)
- Include tests and demonstrate that it works now (travis / testling)
- replpad
- Use npm init of pkginit
- travisify
- npm link
Posted
9:59 AM
0
comments
Links to this post
May 16, 2013
Quadcopter hacking in node.js with ar-drone and opencv
Here's a video of an AR Drone controlled by my node.js code: On the bottom left of the video you can see my computer screen with the video stream from the quadcopter. I had it set up to use opencv and the cv.FACE_CASCASE object detection, so it actually turned towards you. Fun stuff!
Posted
7:32 PM
0
comments
Links to this post
Labels: ar-drone, computer vision, nodejs, opencv
nodepdx 2013: Introducing NodeSecurity.io
Posted
3:57 PM
0
comments
Links to this post
nodepdx 2013: Programming with a Purpose
[Lanyrd notes] Jason challenged us to be selective about what we put our effort into - "we make systems, our systems effect the real world, we are the scarcity, we have as much power as we can recognize [to build the kind of world we want to live in]"
Posted
3:21 PM
0
comments
Links to this post
nodepdx 2013: Thursday Lightning Talks
- Passport - express middleware for OpenID authentication.
- Scoping rules in JavaScript
- Scaling yourself "being busy is a form of laziness [i.e. indiscriminate action]", "don't put energy into things you don't want more of"
Posted
2:59 PM
0
comments
Links to this post
nodepdx 2013: An Introduction to Functional Reactive Programming
Posted
2:39 PM
0
comments
Links to this post
nodepdx 2013: Implementing Git in JavaScript & the Browser: A Case Study
- Write lots of small modules (easier to test, write, document, and change)
- Use browserify (great build tool, great for shimming, great toolings - source maps, beefy, testling ci)
- Put APIs in terms of streams (pluggable API, don't need the entire thing working to test, don't need all of the data at once to process)
Posted
2:02 PM
0
comments
Links to this post



