add webapp/.npminstall target to speed up rebuilds
This commit is contained in:
parent
bc26a8c5d5
commit
33eb1385d2
2 changed files with 10 additions and 2 deletions
11
Makefile
11
Makefile
|
@ -40,11 +40,17 @@ ifneq ($(HAS_SERVER),)
|
|||
cd server && env GOOS=windows GOARCH=amd64 $(GO) build -o dist/plugin-windows-amd64.exe;
|
||||
endif
|
||||
|
||||
# webapp/.npminstall ensures NPM dependencies are installed without having to run this all the time
|
||||
webapp/.npminstall:
|
||||
ifneq ($(HAS_WEBAPP),)
|
||||
cd webapp && npm install
|
||||
touch $@
|
||||
endif
|
||||
|
||||
# webapp builds the webapp, if it exists
|
||||
.PHONY: webapp
|
||||
webapp:
|
||||
webapp: webapp/.npminstall
|
||||
ifneq ($(HAS_WEBAPP),)
|
||||
cd webapp && npm install;
|
||||
cd webapp && npm run fix;
|
||||
cd webapp && npm run build;
|
||||
endif
|
||||
|
@ -100,6 +106,7 @@ endif
|
|||
clean:
|
||||
rm -fr dist/
|
||||
rm -fr server/dist
|
||||
rm -fr webapp/.npminstall
|
||||
rm -fr webapp/dist
|
||||
rm -fr webapp/node_modules
|
||||
rm -fr build/bin/
|
||||
|
|
1
webapp/.gitignore
vendored
1
webapp/.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
node_modules
|
||||
.npminstall
|
||||
|
|
Reference in a new issue