mirror of
https://github.com/scratchfoundation/scratch-render.git
synced 2025-08-11 22:09:18 -04:00
Merge pull request #50 from rschamp/Makefile--
Replace Makefile with npm scripts
This commit is contained in:
commit
a484fda1a6
4 changed files with 15 additions and 32 deletions
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
|
||||
```bash
|
||||
make build
|
||||
npm run build
|
||||
```
|
||||
|
||||
```html
|
||||
|
@ -63,7 +63,7 @@ make build
|
|||
|
||||
## Testing
|
||||
```bash
|
||||
make test
|
||||
npm test
|
||||
```
|
||||
|
||||
## Donate
|
||||
|
|
12
package.json
12
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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue