Skip to content

Instantly share code, notes, and snippets.

@vasilii-b
Last active May 23, 2021 06:32
Show Gist options
  • Save vasilii-b/3d2a2beebf61417edb67f5508d294820 to your computer and use it in GitHub Desktop.
Save vasilii-b/3d2a2beebf61417edb67f5508d294820 to your computer and use it in GitHub Desktop.
Magento 2 setup Grunt
#!/usr/bin/env bash
COLOR_HIHGLIGHT='\033[0;33m'
COLOR_NC='\033[0m'
printf "${COLOR_HIHGLIGHT}Installing Node.js and npm globally.${COLOR_NC}\n"
sudo apt-get update
sudo apt-get install nodejs npm
printf "${COLOR_HIHGLIGHT}Making sure npm uses SSL.${COLOR_NC}\n"
npm config set strict-ssl false
printf "${COLOR_HIHGLIGHT}Making sure there is latest Node.js.${COLOR_NC}\n"
sudo npm install -g n
sudo n stable
printf "${COLOR_HIHGLIGHT}Installing Grunt globally.${COLOR_NC}\n"
sudo npm install -g grunt-cli
printf "${COLOR_HIHGLIGHT}Preparing files for Grunt usage.${COLOR_NC}\n"
cp Gruntfile.js.sample Gruntfile.js
cp package.json.sample package.json
printf "${COLOR_HIHGLIGHT}Installing Grunt inside project.${COLOR_NC}\n"
sudo npm install grunt --save-dev
sudo npm install
sudo npm update
@vasilii-b
Copy link
Author

vasilii-b commented May 23, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment