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

ganti npm jadi yarn

This commit is contained in:
Neko Nekowazarashi 2023-05-30 17:34:40 +07:00
parent 065110d4ff
commit e2e80cf565
4 changed files with 8 additions and 11 deletions

View file

@ -7,7 +7,7 @@ Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__INSTALL_DIR__/
ExecStart=__NODEJS_PATH__/npx next start -p __PORT__
ExecStart=yarn run next start -p __PORT__
# Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these

View file

@ -58,8 +58,7 @@ fi
#=================================================
ynh_script_progression --message="Rebuilding the app..." --weight=1
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build --prefix="$install_dir"
ynh_exec_warn_less yarn --cwd "$install_dir" build
#=================================================
# GENERIC FINALISATION

View file

@ -61,11 +61,10 @@ echo "module.exports = { basePath: '$next_path', };" >> "$install_dir/next.confi
#=================================================
ynh_script_progression --message="Building the app..." --weight=1
ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install --prefix="$install_dir"
npx next telemetry disable
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build --prefix="$install_dir"
yarn config set enableTelemetry 0
ynh_exec_warn_less yarn --cwd "$install_dir" install
yarn run next telemetry disable
ynh_exec_warn_less yarn --cwd "$install_dir" build
#=================================================
# GENERIC FINALIZATION

View file

@ -111,9 +111,8 @@ chown $app:$app "$install_dir/.env.local"
#=================================================
ynh_script_progression --message="Rebuilding the app..." --weight=1
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install --prefix="$install_dir"
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build --prefix="$install_dir"
ynh_exec_warn_less yarn --cwd "$install_dir" install
ynh_exec_warn_less yarn --cwd "$install_dir" build
#=================================================
# START SYSTEMD SERVICE