Remove Makefile in favor of package.json & npm

This commit is contained in:
Jerko Steiner 2017-06-17 12:40:34 -04:00
parent bcbf6b0291
commit 7f4d4286b9
3 changed files with 15 additions and 69 deletions

View File

@ -1,6 +1,6 @@
language: node_js
node_js:
- "8.1.2"
script: make lint coverage build
script: npm run ci
notifications:
email: false

View File

@ -1,65 +0,0 @@
export PATH := node_modules/.bin:$(PATH)
SHELL=/bin/bash
.PHONY: start
start:
chastifol [ make watchify ] [ make sassify ] [ make server ]
.PHONY: build
build: sass js
.PHONY: watchify
watchify:
watchify -d -v -t babelify ./src/client/index.js -o ./build/index.js
.PHONY: js
js:
browserify -d -v -t babelify ./src/client/index.js -o ./build/index.js
.PHONY: sass
sass:
node-sass ./src/scss/style.scss -o ./build/
.PHONY: sassify
sassify: sass
node-sass --watch ./src/scss/style.scss -o ./build/
.PHONY: lint
lint:
eslint src/
.PHONY: lint-fix
lint-fix:
eslint --fix src/
.PHONY: test
test:
jest
.PHONY: testify
testify:
jest --watch
.PHONY: coverage
coverage:
jest --coverage
.PHONY: server
server:
nodemon --ignore src/client ./src/index.js
.PHONY: clean
clean:
rm -rf dist/

View File

@ -6,9 +6,20 @@
"main": "src/index.js",
"scripts": {
"start": "node src/index.js",
"test": "jest --coverage",
"testify": "jest --watch",
"lint": "eslint ./index.js ./src/js"
"start:server": "nodemon src/index.js",
"start:watch": "chastifol [ npm run js:watch ] [ npm run css:watch ] [ npm run start:server ]",
"watch": "",
"build": "npm run css && npm run js",
"test": "jest",
"test:coverage": "jest --coverage",
"test:watch": "jest --watch",
"js": "browserify -t babelify ./src/client/index.js -o ./build/index.js",
"js:watch": "watchify -d -v -t babelify ./src/client/index.js -o ./build/index.js",
"css": "node-sass ./src/scss/style.scss -o ./build/",
"css:watch": "node-sass --watch ./src/scss/style.scss -o ./build/",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"ci": "npm run lint && npm run test:coverage && npm run build"
},
"babel": {
"presets": [