Last active
August 29, 2019 17:46
-
-
Save luizventurote/43af7ba2855748b899d19297f1786aa6 to your computer and use it in GitHub Desktop.
Bash script to deploy Magento 2 theme static content.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "M2 - Deploy Static Content $1/$2 🚀" | |
rm -rf var/view_preprocessed/pub/static/frontend/$1/$2 | |
rm -rf var/view_preprocessed/source/frontend/$1/$2 | |
grunt exec:$2 | |
grunt less:$2 | |
grunt watch | |
echo "Done ⚡️" |
To run this script on any folder, do this on mac OS: sudo cp m2theme.sh /usr/local/bin
.
How to use: m2theme.sh Package theme_name
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Set the right permissions before if necessary:
chmod +x ./m2theme.sh
.