1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/distbin_ynh.git synced 2024-09-03 18:26:10 +02:00

implement new nodejs helper

This commit is contained in:
yalh76 2020-08-08 20:44:31 +02:00
parent c6d1b249c3
commit a50c134e12
3 changed files with 7 additions and 7 deletions

View file

@ -1,5 +1,5 @@
# The path to NODEJS # The path to NODEJS
PATH=__NODEJS_PATH__ PATH=__YNH_NODE_LOAD_PATH__
# The port used by the application # The port used by the application
PORT=__PORT__ PORT=__PORT__

View file

@ -129,13 +129,13 @@ chown -R "$app":"$app" "$final_path"
pushd $final_path pushd $final_path
ynh_use_nodejs ynh_use_nodejs
sudo -u $app env PATH=$PATH npm install --ignore-scripts sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts
sudo -u $app env PATH=$PATH npm run build sudo -u $app $ynh_node_load_PATH $ynh_npm run build
cp package* dist/ cp package* dist/
popd popd
pushd $final_path/dist pushd $final_path/dist
sudo -u $app env PATH=$PATH npm install --ignore-scripts --production sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts --production
popd popd
#================================================= #=================================================

View file

@ -141,13 +141,13 @@ chown -R "$app":"$app" "$final_path"
pushd $final_path pushd $final_path
ynh_use_nodejs ynh_use_nodejs
sudo -u $app env PATH=$PATH npm install --ignore-scripts sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts
sudo -u $app env PATH=$PATH npm run build sudo -u $app $ynh_node_load_PATH $ynh_npm run build
cp package* dist/ cp package* dist/
popd popd
pushd $final_path/dist pushd $final_path/dist
sudo -u $app env PATH=$PATH npm install --ignore-scripts --production sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts --production
popd popd
#================================================= #=================================================