statikbe / craft

Craft CMS scaffolding package, for internal projects by Statik.be
MIT License
29 stars 5 forks source link

Phoenix 🐦‍🔥 #296

Open KarelJanVanHaute opened 8 months ago

KarelJanVanHaute commented 8 months ago

Phoenix AKA frontend updater

The backend is relatively easy to update due to the fact that it is one maintained system (Craft). The frontend on the other hand is a combination of frameworks and tools. This makes it more difficult to make this upgradable. But to keep all our project up-to-date on the frontend-side, we have the need for an updater.

Some first ideas

Let's make a node application to handle the updates. This will be integrated in the baseinstall. And this will update itself if needed.

The updater should be driven by .json files with all the changes that need to be made. The updater should connect to the master git branch of the baseinstall and check if there are newer update files.

A possible flow:

What the update file should facilitate:

Extra

Make a cleanup function to clean up some example files like the jsplugin folder. Also remove this path in the tailwind.config. And remove the source files and the doc files from the updater. ⚠️ This cleanup should not work when run in the baseinstall itself.

Testing?

Take screenshots of all pages based on the sitemap of the site before the upgrade. Take screenshots after the update do a diff on the screenshots to see if the upgrade breaks something.

KarelJanVanHaute commented 8 months ago

Some resources

https://www.npmjs.com/package/simple-git https://github.com/octokit/octokit.js https://www.npmjs.com/package/replace-in-file https://catalins.tech/compare-website-screenshots-nodejs-puppeteer/ https://github.com/garris/BackstopJS