Skip to content

Instantly share code, notes, and snippets.

@mklabs
Last active August 26, 2017 09:53
Show Gist options
  • Save mklabs/0f30c2c0520359676c65616efa93e7fd to your computer and use it in GitHub Desktop.
Save mklabs/0f30c2c0520359676c65616efa93e7fd to your computer and use it in GitHub Desktop.
node makefile - babel / eslint / mocha / watch
test:
mocha test/
babel:
babel lib/ -d src/
lint:
eslint .
build: babel test lint
watch:
watchd lib/**/*.js test/**/* bin/* -c 'bake build'
all: build watch
{
"name": "foo",
"version": "1.0.0",
"description": "",
"main": "src/index.js",
"scripts": {
"test": "mocha test",
"babel": "babel lib/ -d src",
"lint": "eslint .",
"build": "npm run babel && npm run test && npm run lint",
"watch": "watchd lib/**/*.js test/**/* bin/* -c 'npm run build'"
},
"devDependencies": {
"babel-cli": "^6.7.7",
"babel-preset-es2015": "^6.6.0",
"eslint": "^2.8.0",
"mocha": "^2.4.5",
"watchd": "github:mklabs/watchd"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment