A boilerplate for creating healthy npm modules.
- strict mode JavaScript
- mocha test harness with nice output
- dotenv, which reads
.envintoprocess.env. - a
.gitignorefor.envand thenode_modulesdirectory - a hollowed-out
package.json
Put this in .bashrc or whatever:
skeleton() {
git clone https://github.com/zeke/npm-skeleton $1
cd $1
rm -rf ./.git
echo "FOO=BAR" >> .env
echo "node_modules" >> .gitignore
echo ".env" >> .gitignore
npm install
npm test
git init
git add .
git commit -am "---=[ npm skeleton ]=---"
}
Then pass a name for your new project:
skeleton that-new-thang