-
Notifications
You must be signed in to change notification settings - Fork 181
Recommended Steps for Merging Starter into Existing Project
git checkout -b merge-with-starter
git remote add starter https://github.com/qdouble/angular2webpack2-starter.git
git fetch starter
git merge starter/master --allow-unrelated-histories
git add *
git add .gitignore
Original files will be under
<<<<<<< HEAD
=======
Files from starter will be within
=======
=======
>>>>>>> starter/master
You generally want to copy the stuff that you want to keep from the HEAD section and paste it into the starter/master section and then delete the HEAD section. Keep or move entries that you want to keep, delete stuff that’s not needed and save changes.
Make sure to move main app module declarations, imports, and providers to APP_DECLARATIONS, APP_IMPORTS and APP_PROVIDERS files in src/app
folder. Also make sure your main app component is declared and bootstrapped in src/app/app.module
file. Also make sure your main app components selector matches the one in src/index.html
git add *
git add .gitignore
delete node_modules folder and then run npm install
Try to run app in different modes (development/production, JIT, AOT, Universal*)), run tests and resolve any issues.
git add *
git commit
:wq
To merge:
git checkout master
git merge merge-with-starter
To send pull request, push branch:
git push https://github.com/USERNAME/PROJECT_NAME merge-with-starter
Then make pull request on GitHub client application or directly on GitHub website
*If you’re using Universal and have routes with html5pushstate, be sure to add the main routes for Universal to use in the ‘src/server.routes’ file.