If you're interested in working on the core VP toolkit (instead of an end solution that simply uses VP) you'll want to follow the following workflow:
-
Clone this repo and open a command prompt in your clone folder
-
Switch to the
template-dev
branch (git checkout template-dev
) -
Pull the latest code (
git pull
) -
Open VSCode (
code .
) and simply run thetdev
task ("Terminal" menu, "Run Task...", "tdev") to kick-off the local template development harness sites in "watch" mode -
Now, open a browser to view the template site(s) you wish to work on and make your changes to the VP templates and packages in VSCode and you'll immediately see your changes in the browser
-
However, note carefully that there are 2 distinct types of code changes you could make:
-
Changes to VP template sites and packages, which should be checked-in (committed) to the master branch only, and
-
Changes to the template development "environment" or "harness", such as tweaks to the
template-dev
.env file or LoopBack models, which should be checked-in to the template-dev branch, never to the master branch
-
-
Therefore, even though you need to be on the
template-dev
branch when doing VP core development so that you have access to the template dev "harness" files, when it comes time to make a commit (check-in) you'll need to think carefully-
Most commits should be made on the master branch (or possibly the dev branch), so you'll need to
git checkout master
(or dev) just before doing your commit. This will move your in-progress work from your local development harness area ontemplate-dev
to themaster
branch -
But you'll need to avoid mixing into these commits any changes that should stay in the
template-dev
branch
-
-
Finally, after you have made your commit to the master branch, you'll need to merge those changes back into the template-dev branch, favoring any local harness changes that reside in template-dev
# Switch back to template-dev git checkout template-dev # Merge changes from master back into template-dev, preserving dev harness stuff git merge -s recursive -X ours master # Update template-dev branch with merged changes git add --all git commit -am "Merge" git pull git push