diff options
author | Joas Schilling <coding@schilljs.com> | 2019-05-06 14:45:39 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-05-07 14:10:06 +0200 |
commit | 983e71bd932069936f3a4085d79a1f7071b7793d (patch) | |
tree | b781571c81ec075e241fcb2f07dad0794019601f /Makefile | |
parent | a2a21e3742db6256bf9696025f815d9d6513cb73 (diff) |
Merge make files and remove compiled JS
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 64 |
1 files changed, 46 insertions, 18 deletions
@@ -11,38 +11,68 @@ package_name=$(app_name) cert_dir=$(HOME)/.nextcloud/certificates version+=master -all: appstore +all: dev-setup build-js-production + +dev-setup: clean-dev npm-init + +dependabot: dev-setup npm-update build-js-production release: appstore create-tag -create-tag: - git tag -a v$(version) -m "Tagging the $(version) release." - git push origin v$(version) +build-js: + cd vue/ && npm run dev -clean: - rm -rf $(build_dir) - rm -rf node_modules +build-js-production: + cd vue/ && npm run build + +watch-js: + cd vue/ && npm run watch + +lint: + cd vue/ && npm run lint + +lint-fix: + cd vue/ && npm run lint:fix -install-deps: install-npm-deps +npm-init: npm-init-root npm-init-vue -install-npm-deps: - npm install --production +npm-init-root: + npm install -install-npm-deps-dev: - npm install --deps +npm-init-vue: + cd vue/ && npm install -compile-handlebars-templates: dev-setup +npm-update: + npm update + cd vue/ && npm update + +clean: + rm -f js/admin/*.js + rm -f js/admin/*.js.map + rm -f js/collections.js + rm -f js/collections.js.map + rm -f js/collectionsintegration.js + rm -f js/collectionsintegration.js.map + rm -rf $(build_dir) + +clean-dev: clean + rm -rf node_modules + cd vue/ && rm -rf node_modules + +compile-handlebars-templates: bash compile-handlebars-templates.sh -bundle-simplewebrtc: dev-setup +bundle-simplewebrtc: # webrtc-adapter uses JavaScript features not supported by browserify, # so the sources need to be transformed using babel to a compatible # version of JavaScript. npx browserify --standalone SimpleWebRTC --transform [ babelify --global --presets [ @babel/env ] ] js/simplewebrtc/simplewebrtc.js > js/simplewebrtc/bundled.js -dev-setup: install-npm-deps-dev +create-tag: + git tag -a v$(version) -m "Tagging the $(version) release." + git push origin v$(version) -appstore: clean install-deps +appstore: dev-setup build-js-production compile-handlebars-templates bundle-simplewebrtc mkdir -p $(sign_dir) rsync -a \ --exclude=bower.json \ @@ -89,5 +119,3 @@ appstore: clean install-deps echo "Signing packageā¦"; \ openssl dgst -sha512 -sign $(cert_dir)/$(app_name).key $(build_dir)/$(app_name)-$(version).tar.gz | openssl base64; \ fi - - |