Updating The CoreUI template
After months of inactivity, I returned to the JobRM application only to find that all the library versions are woefully out of date, so the inevitable chore of upgrading is on my shoulders. Everything has a new version including the base CoreUI library. But there is no easy and simple way to upgrade.
I attempted the naive method of copy/pasting the version that I have and it mostly worked, but some of the files have been removed that are not removed in my repository. And even though the code will never be called, having those files around feels dirty. Unfortunately the base CoreUI repository does not offer any help in upgrading.
I then decided on a plan of action to make sure that I have the latest version, that the files that should be gone are gone, and that new files are added. To do this, I decided to have a base repository that contains just the version of the starter that exists, which will act as the master copy. I then clone that starter and use
git pull origin to grab any updates that the new repository receives. At this time I am not aware of any core-ui-angular-starter-only repository, but when that becomes available, that is what I will exclusively use.
Downfalls of this option are:
- Merge conflicts will happen on common files such as package.json and other angular routing and views
- The repository will have to be kept up to date manually by me
- I also have re-create the original repository under a new name as to preserve the history from previous post.
Overall, this seems like a good solution that can be implemented as an alternative to needing to do house cleanup for every version. Additionally, this is a good way for theme writers to structure their themes and distribute updates.
To start, create the base repository with just the CoreUI Angular Starter.
coreui-angular-starter - This is a "fork" from the https://github.com/mrholek/CoreUI-Angular/tree/master…
I checked in the version 1.0.0 and will fork from that.
Naming is hard, and renaming is harder. This next version will be named WebSiteUI. I would like to keep the old repository intact for the sake of previous posts and now the organization has detritus to take care of in the future.
- Fork from the base repository
- Update logo
- Add tables page according to the previous post. Promptly fail, and can’t figure out the issues because the advice is to upgrade to latest, as this is not a problem now.
Upgrade to the latest version
After downloading all the releases and incrementally applying each update to the base repository, I started the upgrade to the application.
git remote add coreui https://github.com/garunski/coreui-angular-starter, to add the remote for CoreUI Angular Starter.
git pull coreui master, to grab the latest version
- Resolve any merge conflicts and commit. My repository did not have any changes so mine were minimal.
Now, I should be able to upgrade with a little more confidence in my changes. Next, I will need to set up continuous integration for local development.