mirror of
https://github.com/YunoHost/ynh-dev.git
synced 2024-09-03 20:05:59 +02:00
[enh] Install gulp and run it if needed
This commit is contained in:
parent
03bc8b9add
commit
52ed0e7dcf
1 changed files with 18 additions and 2 deletions
20
ynh-dev
20
ynh-dev
|
@ -249,6 +249,21 @@ elif [ "$1" = "use-git" ]; then
|
||||||
echo ""
|
echo ""
|
||||||
;;
|
;;
|
||||||
yunohost-admin)
|
yunohost-admin)
|
||||||
|
|
||||||
|
# Install npm dependencies if needed
|
||||||
|
which gulp > /dev/null
|
||||||
|
if [ $? -eq 1 ]
|
||||||
|
then
|
||||||
|
sudo apt-get -y install nodejs-legacy npm
|
||||||
|
cd /vagrant/yunohost-admin/src
|
||||||
|
sudo npm install
|
||||||
|
sudo npm install -g bower
|
||||||
|
sudo npm install -g gulp
|
||||||
|
fi
|
||||||
|
cd /vagrant/yunohost-admin/src
|
||||||
|
sudo su -c "bower install" vagrant
|
||||||
|
sudo su -c "gulp build --dev" vagrant
|
||||||
|
|
||||||
echo "Using Git repository for yunohost-admin"
|
echo "Using Git repository for yunohost-admin"
|
||||||
# Remove current sources if not a symlink
|
# Remove current sources if not a symlink
|
||||||
if [ ! -L '/usr/share/yunohost/admin' ]; then
|
if [ ! -L '/usr/share/yunohost/admin' ]; then
|
||||||
|
@ -256,8 +271,9 @@ elif [ "$1" = "use-git" ]; then
|
||||||
fi
|
fi
|
||||||
# Symlink from Git repository
|
# Symlink from Git repository
|
||||||
sudo ln -s -f /vagrant/yunohost-admin/src /usr/share/yunohost/admin
|
sudo ln -s -f /vagrant/yunohost-admin/src /usr/share/yunohost/admin
|
||||||
echo "↳ Don't forget to do build admin with Gulp when hacking yunohost-admin. See README file"
|
|
||||||
echo ""
|
sudo su -c "gulp watch --dev" vagrant
|
||||||
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue