1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mobilizon_ynh.git synced 2024-09-03 19:46:19 +02:00

implement YARN

This commit is contained in:
yalh76 2019-04-13 16:20:18 +02:00
parent d0e6008700
commit bfb9fe7359
2 changed files with 8 additions and 2 deletions

1
conf/.yarnrc Normal file
View file

@ -0,0 +1 @@
network-timeout 600000

View file

@ -82,6 +82,8 @@ ynh_install_app_dependencies $pkg_dependencies
ynh_install_nodejs 10
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key='https://dl.yarnpkg.com/debian/pubkey.gpg'
#=================================================
# INSTALL EXTRA DEPENDENCIES
#=================================================
@ -171,13 +173,16 @@ ynh_replace_string "__NAME__" "$name" "../conf/prod.exs"
ynh_replace_string "__ADMIN_EMAIL__" "$admin_email" "../conf/prod.exs"
cp ../conf/prod.exs "$final_path/$app/config/prod.exs"
# Temprary YARN fix for package material-design-icons
cp ..conf/.yarnrc "$final_path/$app/.yarnrc"
# Give permission to the final_path
chown -R "$app":"$app" "$final_path"
pushd $final_path/$app/js
ynh_use_nodejs
sudo -u $app env PATH=$PATH npm install
sudo -u $app env PATH=$PATH npm run build
sudo -u $app env PATH=$PATH yarn install
sudo -u $app env PATH=$PATH yarn run build
popd
pushd $final_path/$app