Draft: move from hygen to ts-template-strings generator #2511
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
hygen
to 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
hygen
with 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/hygen
to this repo, and tweaked obviously. (see foldernextgen
)ts
files with render functionrender
function (see typeRenderAttributes
)prompt.js
andindex.js
files forhygen
becameprompt.ts
andindex.ts
@feathersjs/hygen
lazyrequire()
to lazyawait import()
@feathersjs/hygen
@feathersjs/hygen
): dependenciesejs
,front-matter
@feathersjs/hygen
): moved fromchalk
topicocolors
andcolorize-template
cause 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: