mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
47 lines
730 B
Makefile
47 lines
730 B
Makefile
|
ESLINT=./node_modules/.bin/eslint
|
||
|
LIVE=./node_modules/.bin/live-server
|
||
|
WATCH=./node_modules/.bin/watch
|
||
|
WEBPACK=./node_modules/.bin/webpack
|
||
|
|
||
|
# ------------------------------------
|
||
|
|
||
|
build:
|
||
|
@make clean
|
||
|
@make static
|
||
|
@make webpack
|
||
|
|
||
|
clean:
|
||
|
rm -rf ./build/*.*
|
||
|
mkdir -p build
|
||
|
|
||
|
static:
|
||
|
cp -a ./static/. ./build/
|
||
|
|
||
|
webpack:
|
||
|
$(WEBPACK)
|
||
|
|
||
|
# ------------------------------------
|
||
|
|
||
|
test:
|
||
|
@make lint
|
||
|
|
||
|
lint:
|
||
|
@$(ESLINT) ./src/{components/**,views/**}/*.jsx
|
||
|
|
||
|
# ------------------------------------
|
||
|
|
||
|
start:
|
||
|
$(LIVE) ./build &
|
||
|
@make watch &
|
||
|
wait
|
||
|
|
||
|
watch:
|
||
|
$(WEBPACK) -d --watch &
|
||
|
$(WATCH) "make static" ./static &
|
||
|
$(WATCH) "make lint" ./src &
|
||
|
wait
|
||
|
|
||
|
# ------------------------------------
|
||
|
|
||
|
.PHONY: build clean static webpack watch test lint
|