Last active
October 22, 2015 21:05
-
-
Save natedsaint/488ef02fcb066e834c03 to your computer and use it in GitHub Desktop.
grunt/gulp build
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
# determines if your repo is grunt or gulp and builds accordingly | |
# (using default target unless you provide one) then | |
# returns to the previous working path. | |
gb () { | |
cd "$(git rev-parse --show-toplevel)"; | |
if [[ -n `find ./ -maxdepth 1 -iname gulpfile.js` ]]; | |
then gulp build; | |
elif [[ -n `find ./ -maxdepth 1 -iname gruntfile.js` ]]; | |
then grunt build; | |
fi | |
cd -; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment