buildsys: enforce eslint for api-viewer
[proxmox-widget-toolkit.git] / src / Makefile
CommitLineData
ecabd437
TL
1include defines.mk
2
3SUBDIRS= css images
4
5JSSRC= \
6 Utils.js \
7 Toolkit.js \
8 Logo.js \
9 mixin/CBind.js \
10 data/reader/JsonObject.js \
11 data/ProxmoxProxy.js \
12 data/UpdateStore.js \
13 data/DiffStore.js \
14 data/ObjectStore.js \
15 data/RRDStore.js \
16 data/TimezoneStore.js \
17 data/model/Realm.js \
c0acd784
WB
18 data/model/Certificates.js \
19 data/model/ACME.js \
ecabd437
TL
20 form/DisplayEdit.js \
21 form/ExpireDate.js \
22 form/IntegerField.js \
23 form/TextField.js \
24 form/DateTimeField.js \
25 form/Checkbox.js \
26 form/KVComboBox.js \
27 form/LanguageSelector.js \
28 form/ComboGrid.js \
29 form/RRDTypeSelector.js \
30 form/BondModeSelector.js \
31 form/NetworkSelector.js \
32 form/RealmComboBox.js \
9b4b2e74 33 form/PruneKeepField.js \
ecabd437 34 form/RoleSelector.js \
4f0c0764 35 form/DiskSelector.js \
a57a5c77 36 form/MultiDiskSelector.js \
050c1684 37 form/TaskTypeSelector.js \
63be5c59 38 form/ACME.js \
ecabd437
TL
39 button/Button.js \
40 button/HelpButton.js \
41 grid/ObjectGrid.js \
42 grid/PendingObjectGrid.js \
98edb916 43 panel/DiskList.js \
ecabd437 44 panel/InputPanel.js \
9354dc13 45 panel/InfoWidget.js \
ecabd437
TL
46 panel/LogView.js \
47 panel/JournalView.js \
b99a771b 48 panel/PermissionView.js \
04eb02d9 49 panel/PruneKeepPanel.js \
ecabd437
TL
50 panel/RRDChart.js \
51 panel/GaugeWidget.js \
60fead29 52 panel/Certificates.js \
5df894de 53 panel/ACMEAccount.js \
658bfdff 54 panel/ACMEPlugin.js \
8915422f 55 panel/ACMEDomains.js \
b87d4733 56 panel/StatusView.js \
ecabd437
TL
57 window/Edit.js \
58 window/PasswordEdit.js \
8d86570c 59 window/SafeDestroy.js \
ecabd437
TL
60 window/TaskViewer.js \
61 window/LanguageEdit.js \
402991a7 62 window/DiskSmart.js \
bde489e5 63 window/ZFSDetail.js \
60fead29 64 window/Certificates.js \
5df894de 65 window/ACMEAccount.js \
658bfdff 66 window/ACMEPluginEdit.js \
8915422f 67 window/ACMEDomains.js \
09195cb6 68 window/FileBrowser.js \
ecabd437
TL
69 node/APT.js \
70 node/NetworkEdit.js \
71 node/NetworkView.js \
72 node/DNSEdit.js \
73 node/HostsView.js \
74 node/DNSView.js \
75 node/Tasks.js \
76 node/ServiceView.js \
77 node/TimeEdit.js \
78 node/TimeView.js
79
80all: ${SUBDIRS}
81 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i; done
82
2622cc7c
TL
83.lint-incremental: ${JSSRC}
84 eslint $?
85 touch "$@"
86
ecabd437
TL
87.PHONY: lint
88check: lint
b0e33a3e 89 eslint --strict api-viewer/APIViewer.js
ecabd437 90lint: ${JSSRC}
2622cc7c 91 eslint --strict ${JSSRC}
557c4505 92 touch ".lint-incremental"
ecabd437 93
2622cc7c 94proxmoxlib.js: .lint-incremental ${JSSRC}
ecabd437
TL
95 # add the version as comment in the file
96 echo "// ${DEB_VERSION_UPSTREAM_REVISION}" > $@.tmp
97 cat ${JSSRC} >> $@.tmp
98 mv $@.tmp $@
99
100install: proxmoxlib.js
101 install -d -m 755 ${WWWBASEDIR}
102 install -m 0644 proxmoxlib.js ${WWWBASEDIR}
103 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
16f2ad97
TL
104
105.PHONY: clean
106clean:
107 rm -f proxmoxlib.js