Skip to content

Commit a1eadfd

Browse files
committed
Manage JS frontend libraries with yarn
1 parent cf2478c commit a1eadfd

File tree

6 files changed

+25
-3
lines changed

6 files changed

+25
-3
lines changed

.github/jobs/baseinstall.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ composer install --no-scripts |tee "$ARTIFACTS"/composer_out.txt
2828
cd ..
2929
section_end
3030

31+
section_start "Install JS frontend dependencies"
32+
cd webapp
33+
apt-get update; apt-get install -y yarnpkg
34+
yarnpkg install
35+
cd ..
36+
section_end
37+
3138
section_start "Set simple admin password"
3239
echo "password" > ./etc/initial_admin_password.secret
3340
echo "default login admin password password" > ~/.netrc

doc/manual/develop.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ already listed under
4141

4242
sudo apt install autoconf automake bats \
4343
python3-sphinx python3-sphinx-rtd-theme fontconfig python3-yaml \
44-
latexmk texlive-latex-recommended texlive-latex-extra tex-gyre
44+
latexmk yarnpkg texlive-latex-recommended texlive-latex-extra tex-gyre
4545

4646
For Fedora use::
4747

webapp/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
/var/log/*
99
!var/log/.gitkeep
1010
/vendor/
11+
/node_modules/
1112

1213
###> phpunit/phpunit ###
1314
/phpunit.xml

webapp/Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ SUBDIRS = config
1212
domserver: composer-dump-autoload
1313

1414
# Install PHP dependencies
15-
composer-dependencies:
15+
composer-dependencies: node-dependencies
1616
ifeq (, $(shell command -v composer 2> /dev/null))
1717
$(error "'composer' command not found in $(PATH), install it via your package manager or https://getcomposer.org/download/")
1818
endif
1919
# We use --no-scripts here because at this point the autoload.php file is
2020
# not generated yet, which is needed to run the post-install scripts.
2121
composer $(subst 1,-q,$(QUIET)) install --prefer-dist -o -a --no-scripts --no-plugins
2222

23-
composer-dependencies-dev:
23+
composer-dependencies-dev: node-dependencies
2424
composer $(subst 1,-q,$(QUIET)) install --prefer-dist --no-scripts --no-plugins
2525

2626
# Dump autoload dependencies (including plugins)
@@ -36,6 +36,13 @@ vendor/autoload_runtime.php:
3636
composer-dump-autoload-dev:
3737
composer $(subst 1,-q,$(QUIET)) dump-autoload
3838

39+
node-dependencies:
40+
ifeq (, $(shell command -v yarn || command -v yarnpkg 2> /dev/null))
41+
$(error "neither 'yarnpkg' nor 'yarn' command found in $(PATH), install it via your package manager or https://yarnpkg.com/cli/node")
42+
endif
43+
@YARN_CMD=$(shell command -v yarn || command -v yarnpkg); \
44+
$$YARN_CMD install
45+
3946
# Run Symfony in dev mode (for maintainer-mode):
4047
.env.local:
4148
@echo "Creating file '$@'..."

webapp/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"dependencies": {}
3+
}

webapp/yarn.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+

0 commit comments

Comments
 (0)