Skip to content

Instantly share code, notes, and snippets.

@natedsaint
Last active October 22, 2015 21:05
Show Gist options
  • Save natedsaint/488ef02fcb066e834c03 to your computer and use it in GitHub Desktop.
Save natedsaint/488ef02fcb066e834c03 to your computer and use it in GitHub Desktop.
grunt/gulp build
# 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