grim/devweb

5ad16c08562a
Parents 127cb04c7005
Children 4f1533323fbc
Only run npm build if the npm sources have changed
  • +10 -1
    Makefile
  • --- a/Makefile Thu Jul 16 05:38:28 2020 -0500
    +++ b/Makefile Thu Jul 16 05:44:42 2020 -0500
    @@ -7,6 +7,13 @@
    CLEAN_DIRS := \
    frontend/dist
    +FRONTEND_SOURCES := \
    + frontend/babel.config.js \
    + frontend/package-lock.json \
    + frontend/package.json \
    + frontend/public \
    + frontend/src/
    +
    .PHONY: all
    all: devweb
    @@ -19,8 +26,10 @@
    which esc
    which npm
    -devweb: tools
    +frontend/dist: $(FRONTEND_SOURCES)
    npm run --prefix frontend build
    +
    +devweb: tools frontend/dist
    go generate ./...
    go build