]> git.proxmox.com Git - pve-manager.git/commitdiff
enable eslint on build
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 19 May 2021 14:56:50 +0000 (16:56 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 19 May 2021 15:42:21 +0000 (17:42 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile
www/Makefile
www/manager6/Makefile

index be8cc56f7c78c671c36399ba463d09008faba43d..e23327d9e7af749cf09d0b6aa9aa4c8c094b2010 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,9 +20,10 @@ all: ${SUBDIRS}
        set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i; done
 
 .PHONY: check
-check: bin test
+check: bin test www
        ${MAKE} -C bin check
        ${MAKE} -C test check
+       ${MAKE} -C www check
 
 .PHONY: dinstall
 dinstall: ${DEB}
index 9691f1f0ffe5927db46a104215c674316e0a2844..07fd5703d46627a61714c7c231e7d9948a8e458a 100644 (file)
@@ -12,6 +12,10 @@ install:
        install -m 0644 u2f-api.js ${WWWJSDIR}
        install -m 0644 qrcode.min.js ${WWWJSDIR}
 
+.PHONY: check
+check:
+       ${MAKE} -C manager6 $@
+
 .PHONY: clean
 clean:
        set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
index afed32833d6b3c752e79958b93ad65b7d4660ac5..506b5a4ead54bcd76d8e725c2866e30991c94163 100644 (file)
@@ -276,10 +276,16 @@ JSSRC=                                                    \
 
 all: pvemanagerlib.js
 
+.lint-incremental: ${JSSRC}
+       eslint $?
+       touch "$@"
+
+.PHONY: lint check
+check: lint
 lint: ${JSSRC}
        eslint --strict ${JSSRC}
 
-pvemanagerlib.js: OnlineHelpInfo.js ${JSSRC}
+pvemanagerlib.js: .lint-incremental OnlineHelpInfo.js ${JSSRC}
        cat OnlineHelpInfo.js ${JSSRC} >$@.tmp
        mv $@.tmp $@
 
@@ -295,7 +301,7 @@ install: pvemanagerlib.js
 .PHONY: clean
 clean:
        find . -name '*~' -exec rm {} ';'
-       rm -rf pvemanagerlib.js OnlineHelpInfo.js
+       rm -rf pvemanagerlib.js OnlineHelpInfo.js .lint-incremental