Prerequisites:
I need to ogranize Single Page Application (SPA) project development, and frontend should be based on one of popuplar frontend js frameworks, and this means use of frontend building system based on gulp/webpack for building final bundle from let's say Es2015 js sources, Sass styles and Jade markup. Backend should be based on Laravel 5.x.
So finally I've frontend bundle which should be work with backend code. and on each stage of development I have certain frontend bundle and certain backend code which can work together correctly.
Questions:
How most correctly place all my source code under version control (let's say with use of Git)? Do I need to create one repo for all project of two separate repos for backend and frontend parts? Why?
How to organize version control for most convenient and simple deployment of current release version of project to production server?
Here is my thoughts: it looks like a good idea to have actual version of both frontend bundle and backend code + migrations in one repo, but my dilemma is: for production I need only frontend bundle but not initial frontend source code (sass, jade etc files). My frontend bundle constantly rebulds with my building system on each changes in frontend source code/styles/makrup, so output bundle is different after each build.
- If I would create common repo for both backend and frontend, then frontend sources will be also included in the repo and I don't need them on production server.
- If I would create two separate repos for frontend and backend, then how would I syncronize actual frontend bundle and actual version of backend code and how would I return to specific version of my project?
I hope this was written quite clear to understand me and I ask any sort of advice or links for some docs which can clarify such quiestions for me.