Open dwarakaprasad opened 1 month ago
Local blueprint is used in project that can be type commonjs.
Generators are type module, we need to use mjs extension or add a package.json with type module in .blueprint
dir.
Non local blueprints are packages that we generate as type module. So it can have js extension. js
is the preferred extension so we use it.
If you prefer mjs extension you can use --no-js
option.
Since js is the default now, would make sense to convert to --mjs
.
makes sense, thank you @mshima. Is there any plan in the future to convert the blueprints to typescript.
No plans for typescript blueprints in official blueprints and generate-blueprint command. I don’t see any advantage in adding the typescript complexity in blueprints. But it’s possible to create a typescript blueprint.
We should add an option extension
with 'js' and 'mjs' options, which will default to 'mjs' for local blueprint and 'js' otherwise.
We should add an option
extension
with 'js' and 'mjs' options, which will default to 'mjs' for local blueprint and 'js' otherwise
good suggestion, I will try to address this after the long weekend.
JHipster has completed the sample check
.yo-rc.json
:
Entities JDL:
Application: successfully generated
Frontend check: skipped
Backend check: skipped
E2E check: skipped
This check uses jhipster info
output from the issue description to generate the sample.
Bug report that does not contain this information will be marked as invalid.
Overview of the issue
Generating a new blueprint using
jhipster generate-blueprint
creates files<root-folder>/generators/generator.js
instead of *.mjs files.Motivation for or Use Case
Reproduce the error
Related issues
25276 added this logic which only enables if local blueprint is selected.
Is this by design.
Suggest a Fix
JHipster Version(s)
JHipster configuration
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System