I'm currently working with Yeoman AngularJS Generator for my student project at School. Before I deploy my project to Heroku (I'm using heroku-buildpack-static), I need to run $ grunt build
to build entire source code and automatically put it in dist/
folder. I must to include dist/
by removing dist/
row in .gitignore
file, but I don't want to push these code in dist/
folder to another branches.
Asked
Active
Viewed 1,534 times
3

Tien Le
- 31
- 3
1 Answers
1
You don't really want to have fundamental structural differences between branches. A better way to achieve what you want to do is to perform this build step on Heroku, if that's the place you need it to happen.
You can run this build and create this directory using an NPM postinstall
hook.
Check my answer to this related question: https://stackoverflow.com/a/42237745/673882

Community
- 1
- 1

Nathan Loyer
- 1,339
- 10
- 20
-
Hi Nathan Loyer, I got it. Thanks for your answer. – Tien Le May 12 '17 at 14:32