From 662ba3c645fa696e95f07b45e39e9c039bf24bc3 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Mon, 17 Oct 2016 09:56:27 -0400 Subject: [PATCH] Replace Makefile with npm scripts Allows Windows users to run what's currently in the Makefile --- .eslintignore | 5 +++++ Makefile | 26 -------------------------- README.md | 4 ++-- package.json | 12 ++++++++---- 4 files changed, 15 insertions(+), 32 deletions(-) create mode 100644 .eslintignore delete mode 100644 Makefile diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..b277a9d --- /dev/null +++ b/.eslintignore @@ -0,0 +1,5 @@ +dist.js +node_modules/* +playground/* +render.js +render.min.js diff --git a/Makefile b/Makefile deleted file mode 100644 index 20c327f..0000000 --- a/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -ESLINT=./node_modules/.bin/eslint -WEBPACK=./node_modules/.bin/webpack --progress --colors -WEBPACK_DEV_SERVER=./node_modules/.bin/webpack-dev-server -# ------------------------------------------------------------------------------ - -build: - $(WEBPACK) - -watch: - $(WEBPACK) --watch --watch-poll - -serve: - $(WEBPACK_DEV_SERVER) - -# ------------------------------------------------------------------------------ - -lint: - $(ESLINT) ./src/*.js - $(ESLINT) ./src/**/*.js - -test: - @make lint - -# ------------------------------------------------------------------------------ - -.PHONY: build watch serve lint test diff --git a/README.md b/README.md index 98c3fe3..60dcded 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ renderer.connectWorker(worker); ## Standalone Build ```bash -make build +npm run build ``` ```html @@ -63,7 +63,7 @@ make build ## Testing ```bash -make test +npm test ``` ## Donate diff --git a/package.json b/package.json index 57a0f27..f150efd 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,14 @@ }, "main": "./dist.js", "scripts": { - "prepublish": "make build", - "start": "make serve", - "test": "make test", - "version": "./node_modules/.bin/json -f package.json -I -e \"this.repository.sha = '$(git log -n1 --pretty=format:%H)'\"" + "build": "./node_modules/.bin/webpack --progress --colors", + "lint": "./node_modules/.bin/eslint .", + "prepublish": "npm run build", + "prepublish-watch": "npm run watch", + "start": "./node_modules/.bin/webpack-dev-server", + "test": "npm run lint", + "version": "./node_modules/.bin/json -f package.json -I -e \"this.repository.sha = '$(git log -n1 --pretty=format:%H)'\"", + "watch": "./node_modules/.bin/webpack --progress --colors --watch --watch-poll" }, "devDependencies": { "babel-core": "6.9.1",