Merge pull request #1779 from nextcloud/techdebt/noid/root-make-file-and-remove-compiled-assets

Merge make files and remove compiled JS
This commit is contained in:
Joas Schilling 2019-05-08 13:24:44 +02:00 committed by GitHub
commit c9793a8a54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 55 additions and 2695 deletions

7
.gitignore vendored
View file

@ -2,6 +2,13 @@
build
node_modules
# Compiled JS
/js/admin/*.js
/js/admin/*.js.map
/js/collections.js
/js/collectionsintegration.js
/js/*.js.map
# Karma/jasmine coverage data
coverage
tests/php/coverage-html

View file

@ -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 compile-handlebars-templates bundle-simplewebrtc
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
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
npm-init: npm-init-root npm-init-vue
npm-init-root:
npm install
npm-init-vue:
cd vue/ && npm install
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
install-deps: install-npm-deps
install-npm-deps:
npm install --production
install-npm-deps-dev:
npm install --deps
compile-handlebars-templates: dev-setup
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
mkdir -p $(sign_dir)
rsync -a \
--exclude=bower.json \
@ -88,5 +118,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

View file

@ -4,3 +4,5 @@
export PATH=./node_modules/.bin/:$PATH
handlebars -n OCA.Talk.Views.Templates js/views/templates/ -f js/views/templates.js
echo "OK"

0
js/admin/.gitkeep Normal file
View file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,45 +0,0 @@
app_name=spreed
project_dir=$(CURDIR)/../$(app_name)
build_dir=$(CURDIR)/build
source_dir=$(build_dir)/$(app_name)
sign_dir=$(build_dir)/sign
all: dev-setup build-js-production
dev-setup: clean clean-dev npm-init
dependabot: dev-setup npm-update build-js-production
npm-init:
npm install
npm-update:
npm update
build-js:
npm run dev
build-js-production:
npm run build
lint:
npm run lint
lint-fix:
npm run lint:fix
watch-js:
npm run watch
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:
rm -rf node_modules