Skip to content

Commit

Permalink
Merge pull request #4584 from owncloud/rollup
Browse files Browse the repository at this point in the history
Switch from webpack to rollup
  • Loading branch information
fschade authored Feb 8, 2021
2 parents d1abcea + 60513b0 commit 695d3df
Show file tree
Hide file tree
Showing 210 changed files with 3,122 additions and 25,592 deletions.
15 changes: 15 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"shippedProposals": true,
"corejs": {
"version": 3,
"proposals": true
}
}
]
]
}
10 changes: 10 additions & 0 deletions .depcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ignores": [
"cucumber-pretty",
"requirejs",
"nightwatch-vrt",
"@babel/polyfill",
"@babel/register",
"babel-eslint"
]
}
2 changes: 1 addition & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ def buildWeb():
'image': 'owncloudci/nodejs:12',
'pull': 'always',
'commands': [
'yarn dist',
'yarn build',
'cp tests/drone/config.json dist/config.json',
'mkdir -p /srv/config',
'cp -r /var/www/owncloud/web/tests/drone /srv/config',
Expand Down
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ release/*
**/l10n/locale
**/l10n/template.pot

apps/*
!apps/draw-io
!apps/files
!apps/markdown-editor
!apps/media-viewer

build/version.json

/hugo
Expand Down
16 changes: 0 additions & 16 deletions .htaccess

This file was deleted.

99 changes: 21 additions & 78 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,66 +1,20 @@

SERVER_HOST=0.0.0.0:8300

apps=files
all_apps=$(addprefix app-,$(apps))
core_bundle=dist/core/core.bundle.js
DIST := dist
HUGO := hugo
NAME := web

all: build

.PHONY: build
build: core $(all_apps)
DIST := ${CURDIR}/dist
HUGO := ${CURDIR}/hugo
RELEASE := ${CURDIR}/release
NODE_MODULES := ${CURDIR}/node_modules

.PHONY: clean
clean: clean-core $(addprefix clean-app-,$(apps))

node_modules: package.json yarn.lock
yarn install --frozen-lockfile && touch node_modules

dist/core/core.bundle.js: node_modules
yarn run build:dev

#
# core
#
.PHONY: core
core: dist/core/core.bundle.js

.PHONY: clean-core
clean-core:
rm -rf $(DIST) $(HUGO) $(CURDIR)/release $(CURDIR)/build/dist
rm -rf node_modules
clean:
rm -rf ${DIST} ${HUGO} ${RELEASE} ${NODE_MODULES}

#
# Release
# make this app compatible with the ownCloud
# default build tools
#
.PHONY: dist
dist:
.PHONY: release
release: clean
make -f Makefile.release
mkdir -p $(CURDIR)/build/dist
cp $(CURDIR)/release/web-app.tar.gz $(CURDIR)/build/dist/

#
#
# Apps
#
.PHONY: app-%
app-%:
@echo Building app $*
$(MAKE) -C apps/$*

.PHONY: clean-app-%
clean-app-%:
@echo Cleaning up app $*
$(MAKE) -C apps/$* clean
.PHONY: docs
docs: docs-copy docs-build

#
# Docs
#
.PHONY: docs-copy
docs-copy:
mkdir -p $(HUGO); \
Expand All @@ -77,39 +31,28 @@ docs-copy:
docs-build:
cd $(HUGO); hugo

.PHONY: docs
docs: docs-copy docs-build

#
# Test server
#
.PHONY: run
run:
php -t dist/ -S "$(SERVER_HOST)"


.PHONY: l10n-push
l10n-push:
cd l10n && tx -d push -s --no-interactive
cd apps/files/l10n && tx -d push -s --no-interactive
cd apps/markdown-editor/l10n && tx -d push -s --no-interactive
cd apps/media-viewer/l10n && tx -d push -s --no-interactive
cd packages/web-runtime/l10n && tx -d push -s --no-interactive
cd packages/web-app-files/l10n && tx -d push -s --no-interactive
cd packages/web-app-draw-io/l10n && tx -d push -s --no-interactive
cd packages/web-app-media-viewer/l10n && tx -d push -s --no-interactive

.PHONY: l10n-pull
l10n-pull:
cd l10n && tx -d pull -a
cd apps/files/l10n && tx -d pull -a
cd apps/markdown-editor/l10n && tx -d pull -a
cd apps/media-viewer/l10n && tx -d pull -a
cd packages/web-runtime/l10n && tx -d pull -a
cd packages/web-app-files/l10n && tx -d pull -a
cd packages/web-app-draw-io/l10n && tx -d pull -a
cd packages/web-app-media-viewer/l10n && tx -d pull -a

.PHONY: l10n-clean
l10n-clean:
cd l10n && make clean
cd packages/web-runtime/l10n && make clean

.PHONY: l10n-read
l10n-read: node_modules
cd l10n && rm -rf template.pot && make extract
cd packages/web-runtime/l10n && rm -rf template.pot && make extract

.PHONY: l10n-write
l10n-write: node_modules
cd l10n && rm -rf translations.json && make translations
cd packages/web-runtime/l10n && rm -rf translations.json && make translations
27 changes: 8 additions & 19 deletions Makefile.release
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,17 @@ endif
.PHONY: build-release
build-release: build package


.PHONY: build
build: build-web copy-configs
build: build-web copy-config

.PHONY: build-web
build-web:
rm -rf $(dist_dir)
$(YARN) install
$(YARN) dist

.PHONY: copy-configs
copy-configs: copy-web-config copy-htaccess

.PHONY: copy-web-config
copy-web-config:
cp config.json.dist $(dist_dir)/
$(YARN) build

.Phony: copy-htaccess
copy-htaccess:
cp .htaccess $(dist_dir)/
.PHONY: copy-config
copy-config:
cp config/config.json.dist $(dist_dir)/

.PHONY: package
package: create-release-folder create-packages
Expand All @@ -61,7 +52,7 @@ create-packages: package-plain package-ocx

.PHONY: package-plain
package-plain:
cd $(dist_dir) && tar -czf $(CURDIR)/release/$(app_name).tar.gz -C $(dist_dir) * .htaccess
cd $(dist_dir) && tar -czf $(CURDIR)/release/$(app_name).tar.gz -C $(dist_dir) *

.PHONY: package-ocx
package-ocx: ocx-app-config sign ocx-app-bundle
Expand All @@ -76,10 +67,8 @@ endif

.PHONY: ocx-app-config
ocx-app-config:
cp -R appinfo $(dist_dir)
cp -R img $(dist_dir)
cp -R lib $(dist_dir)
rm $(dist_dir)/.htaccess # .htaccess is not needed/read in ocx app deployment scenarios
cp -R packages/web-integration-oc10/appinfo $(dist_dir)
cp -R packages/web-integration-oc10/lib $(dist_dir)

.PHONY: ocx-app-bundle
ocx-app-bundle:
Expand Down
3 changes: 0 additions & 3 deletions apps/draw-io/.gitignore

This file was deleted.

31 changes: 0 additions & 31 deletions apps/draw-io/package.json

This file was deleted.

53 changes: 0 additions & 53 deletions apps/draw-io/webpack.common.js

This file was deleted.

6 changes: 0 additions & 6 deletions apps/draw-io/webpack.dev.js

This file was deleted.

Loading

0 comments on commit 695d3df

Please sign in to comment.