Replace Makefile with npm scripts
Allows Windows users to run what's currently in the Makefile
This commit is contained in:
5
.eslintignore
Normal file
5
.eslintignore
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
dist.js
|
||||||
|
node_modules/*
|
||||||
|
playground/*
|
||||||
|
render.js
|
||||||
|
render.min.js
|
||||||
26
Makefile
26
Makefile
@@ -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
|
|
||||||
@@ -50,7 +50,7 @@ renderer.connectWorker(worker);
|
|||||||
|
|
||||||
## Standalone Build
|
## Standalone Build
|
||||||
```bash
|
```bash
|
||||||
make build
|
npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
```html
|
```html
|
||||||
@@ -63,7 +63,7 @@ make build
|
|||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
```bash
|
```bash
|
||||||
make test
|
npm test
|
||||||
```
|
```
|
||||||
|
|
||||||
## Donate
|
## Donate
|
||||||
|
|||||||
12
package.json
12
package.json
@@ -11,10 +11,14 @@
|
|||||||
},
|
},
|
||||||
"main": "./dist.js",
|
"main": "./dist.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepublish": "make build",
|
"build": "./node_modules/.bin/webpack --progress --colors",
|
||||||
"start": "make serve",
|
"lint": "./node_modules/.bin/eslint .",
|
||||||
"test": "make test",
|
"prepublish": "npm run build",
|
||||||
"version": "./node_modules/.bin/json -f package.json -I -e \"this.repository.sha = '$(git log -n1 --pretty=format:%H)'\""
|
"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": {
|
"devDependencies": {
|
||||||
"babel-core": "6.9.1",
|
"babel-core": "6.9.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user