Draft: move from hygen to ts-template-strings generator#2511
Closed
fratzinger wants to merge 4 commits intofeathersjs:hygen-clifrom
Closed
Draft: move from hygen to ts-template-strings generator#2511fratzinger wants to merge 4 commits intofeathersjs:hygen-clifrom
fratzinger wants to merge 4 commits intofeathersjs:hygen-clifrom
Conversation
added 2 commits
December 18, 2021 16:55
Member
|
This is amazing! I'll have a closer look over the holidays but this looks like it could totally work. |
Member
|
This has been finalized in the first version via #2578 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduction
Discussed on slack before. This is based on an idea of @daffl to move from
hygento a new generator based on ts & template strings. This was the initial sketch from @daffl, which is the base of this new generator:Related: #2414, #2425
Summary
Proof of concept. Moved from
hygenwith ejs to new custom generator based on ts & template strings. This is 'just' a refactor. Globally spoken, nothing added or changed. It was fairly easy and has a lot in common with hygen. I enjoyed the template strings very much!I think this could be something!
Things changed:
@feathersjs/hygento this repo, and tweaked obviously. (see foldernextgen)tsfiles with render functionrenderfunction (see typeRenderAttributes)prompt.jsandindex.jsfiles forhygenbecameprompt.tsandindex.ts@feathersjs/hygenlazyrequire()to lazyawait import()@feathersjs/hygen@feathersjs/hygen): dependenciesejs,front-matter@feathersjs/hygen): moved fromchalktopicocolorsandcolorize-templatecause perfBenefits:
Downsides:
Things to be done:
Discussion:
David, what do you think? Where to go from this? Do you think it's worth investigating?
I have some thoughts for it and am happy to discuss them: