srcery-colors / srcery-terminal

Srcery theme terminal configurations
MIT License
197 stars 17 forks source link

Feat/refactor - new template engine, use new palette package #176

Closed roosta closed 1 year ago

roosta commented 1 year ago

Refactor

I refactored most of the codebase, I decided to change the template engine to handlebars, dropping termcolor. Handlebars is a lot more flexible to work with.

I changed all the templates to handlebars syntax, and redid most of the builder, simplifying in the process.

Every config was made sure exported identical, except for terminal.app

terminal.app

I had to drop support for terminal.app, there isn't any good way of programmatically generate a proper srgb palette. terminal.app is expecting some base64 nonsense, and I was never happy with the magic numbers/copy pasta of that particular config, so I dropped it.

Closes #12

README generation

I've moved the readme to a template as well, serving as an example of how to generate readme tables using the new palette package

Tooling

We should probably setup some sort of build action, I've not had time to look at that yet, or considered the implementation, but I expect a default make would do, checking for changes maybe. No decent way of testing this, but just checking that the build goes through could go a long way.

I've also removed the install rule from the make file, instead creating a rule node_modules so installing should happen automatically.

Feedback appreciated :)

MindTooth commented 1 year ago

Nice job! Do like the helpers in Handlebars. So simple, yet so powerful.

Also, having the colors in a package and being able to reference different formats, is perfect. 👌🏻

roosta commented 1 year ago

Thanks @MindTooth :) You thinking squash merge here? The commit history doesn't give you very good snapshots for debugging, and all those fix commits only apply to the refactor.

MindTooth commented 1 year ago

Thanks @MindTooth :) You thinking squash merge here? The commit history doesn't give you very good snapshots for debugging, and all those fix commits only apply to the refactor.

Squash in WebUI resets your signatures. So, it’s up to you. 😉 But, some sort of squashing is better.

roosta commented 1 year ago

Alright, screw it, I'll just merge, worts and all. EDIT: Ok, maybe getting late, I'll look at this tomorrow :)

roosta commented 1 year ago

Doesn't seem like signing squash merge when your the author is a problem:

GitHub will automatically use GPG to sign commits you make using the GitHub web interface, except for when you squash and merge a pull request that you are not the author of.

roosta commented 1 year ago

Well, it signed the commit with something, but I'm not sure which key, but not my personal one. Oh well. Good to know going forward.