From 47978e8772d9ac355c76f6ccd6fc59394bc7c301 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 24 Feb 2018 18:37:57 +0100 Subject: Webpack / Configure webpack, ESLint, Travis, Makefile, npm/yarn and git --- Makefile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5e3ae26d..d1216569 100644 --- a/Makefile +++ b/Makefile @@ -157,15 +157,23 @@ composer_dependencies: clean composer install --no-dev --prefer-dist find vendor/ -name ".git" -type d -exec rm -rf {} + +### download 3rd-party frontend libraries +frontend_dependencies: + yarn install + +### Build frontend dependencies +build_frontend: frontend_dependencies + yarn run build + ### generate a release tarball and include 3rd-party dependencies and translations -release_tar: composer_dependencies htmldoc translate +release_tar: composer_dependencies htmldoc translate build_frontend git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).tar HEAD tar rvf $(ARCHIVE_VERSION).tar --transform "s|^vendor|$(ARCHIVE_PREFIX)vendor|" vendor/ tar rvf $(ARCHIVE_VERSION).tar --transform "s|^doc/html|$(ARCHIVE_PREFIX)doc/html|" doc/html/ gzip $(ARCHIVE_VERSION).tar ### generate a release zip and include 3rd-party dependencies and translations -release_zip: composer_dependencies htmldoc translate +release_zip: composer_dependencies htmldoc translate build_frontend git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).zip -9 HEAD mkdir -p $(ARCHIVE_PREFIX)/{doc,vendor} rsync -a doc/html/ $(ARCHIVE_PREFIX)doc/html/ @@ -207,3 +215,8 @@ htmldoc: ### Generate Shaarli's translation compiled file (.mo) translate: @find inc/languages/ -name shaarli.po -execdir msgfmt shaarli.po -o shaarli.mo \; + +### Run ESLint check against Shaarli's JS files +eslint: + @yarn run eslint assets/vintage/js/ + @yarn run eslint assets/default/js/ -- cgit v1.2.3