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:
parent
c6d1b249c3
commit
a50c134e12
3 changed files with 7 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
# The path to NODEJS
|
||||
PATH=__NODEJS_PATH__
|
||||
PATH=__YNH_NODE_LOAD_PATH__
|
||||
|
||||
# The port used by the application
|
||||
PORT=__PORT__
|
||||
|
|
|
@ -129,13 +129,13 @@ chown -R "$app":"$app" "$final_path"
|
|||
|
||||
pushd $final_path
|
||||
ynh_use_nodejs
|
||||
sudo -u $app env PATH=$PATH npm install --ignore-scripts
|
||||
sudo -u $app env PATH=$PATH npm run build
|
||||
sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts
|
||||
sudo -u $app $ynh_node_load_PATH $ynh_npm run build
|
||||
cp package* dist/
|
||||
popd
|
||||
|
||||
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
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -141,13 +141,13 @@ chown -R "$app":"$app" "$final_path"
|
|||
|
||||
pushd $final_path
|
||||
ynh_use_nodejs
|
||||
sudo -u $app env PATH=$PATH npm install --ignore-scripts
|
||||
sudo -u $app env PATH=$PATH npm run build
|
||||
sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts
|
||||
sudo -u $app $ynh_node_load_PATH $ynh_npm run build
|
||||
cp package* dist/
|
||||
popd
|
||||
|
||||
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
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue