aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-03-28 19:08:06 +0200
committerGitHub <noreply@github.com>2018-03-28 19:08:06 +0200
commitc81f1afc0a3a16daf98741a63c7524b27835da99 (patch)
treedfe81b73f028dfc27eda916b14bf4bc17966b082 /Makefile
parent9b2bd66fb60ffd5a833480bf329062c7d57bc8c4 (diff)
parentd7eb06bd7c4d01bbdf67f4f100af7a3e300098d3 (diff)
downloadShaarli-c81f1afc0a3a16daf98741a63c7524b27835da99.tar.gz
Shaarli-c81f1afc0a3a16daf98741a63c7524b27835da99.tar.zst
Shaarli-c81f1afc0a3a16daf98741a63c7524b27835da99.zip
Merge pull request #1072 from ArthurHoaro/feature/modern-front-end
Manage frontend dependencies with npm/yarn and webpack
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5e3ae26d..d1216569 100644
--- a/Makefile
+++ b/Makefile
@@ -157,15 +157,23 @@ composer_dependencies: clean
157 composer install --no-dev --prefer-dist 157 composer install --no-dev --prefer-dist
158 find vendor/ -name ".git" -type d -exec rm -rf {} + 158 find vendor/ -name ".git" -type d -exec rm -rf {} +
159 159
160### download 3rd-party frontend libraries
161frontend_dependencies:
162 yarn install
163
164### Build frontend dependencies
165build_frontend: frontend_dependencies
166 yarn run build
167
160### generate a release tarball and include 3rd-party dependencies and translations 168### generate a release tarball and include 3rd-party dependencies and translations
161release_tar: composer_dependencies htmldoc translate 169release_tar: composer_dependencies htmldoc translate build_frontend
162 git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).tar HEAD 170 git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).tar HEAD
163 tar rvf $(ARCHIVE_VERSION).tar --transform "s|^vendor|$(ARCHIVE_PREFIX)vendor|" vendor/ 171 tar rvf $(ARCHIVE_VERSION).tar --transform "s|^vendor|$(ARCHIVE_PREFIX)vendor|" vendor/
164 tar rvf $(ARCHIVE_VERSION).tar --transform "s|^doc/html|$(ARCHIVE_PREFIX)doc/html|" doc/html/ 172 tar rvf $(ARCHIVE_VERSION).tar --transform "s|^doc/html|$(ARCHIVE_PREFIX)doc/html|" doc/html/
165 gzip $(ARCHIVE_VERSION).tar 173 gzip $(ARCHIVE_VERSION).tar
166 174
167### generate a release zip and include 3rd-party dependencies and translations 175### generate a release zip and include 3rd-party dependencies and translations
168release_zip: composer_dependencies htmldoc translate 176release_zip: composer_dependencies htmldoc translate build_frontend
169 git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).zip -9 HEAD 177 git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).zip -9 HEAD
170 mkdir -p $(ARCHIVE_PREFIX)/{doc,vendor} 178 mkdir -p $(ARCHIVE_PREFIX)/{doc,vendor}
171 rsync -a doc/html/ $(ARCHIVE_PREFIX)doc/html/ 179 rsync -a doc/html/ $(ARCHIVE_PREFIX)doc/html/
@@ -207,3 +215,8 @@ htmldoc:
207### Generate Shaarli's translation compiled file (.mo) 215### Generate Shaarli's translation compiled file (.mo)
208translate: 216translate:
209 @find inc/languages/ -name shaarli.po -execdir msgfmt shaarli.po -o shaarli.mo \; 217 @find inc/languages/ -name shaarli.po -execdir msgfmt shaarli.po -o shaarli.mo \;
218
219### Run ESLint check against Shaarli's JS files
220eslint:
221 @yarn run eslint assets/vintage/js/
222 @yarn run eslint assets/default/js/