Split up generator-donejs
See original GitHub issueI suggest we separate generator-donejs
into separate generators:
donejs-app
donejs-plugin
donejs-generator
donejs-component
donejs-supermodel
donejs-module
and a utility project donejs-plugin-utils
(or something like that) for the utility functions currently in lib/utils.js.
The main benefit of this is that dependencies that are only needed by one of the generators would not need to be installed with donejs add app
. Here’s a list of those dependencies:
generator | dependency | size |
---|---|---|
component | can-view-autorender | 570 KB |
component | done-component | 1.9 MB |
component | can-component | 1.8 MB |
supermodel | can-fixture | 3.9 MB |
supermodel | can-connect | 3.8 MB |
Install times before removing these:
Analyzing 22 dependencies...
...
Total time (non-deduped): 2m 5.7s
Total size (non-deduped): 175 MB
And once they’re removed:
Analyzing 17 dependencies...
...
Total time (non-deduped): 1m 50.9s
Total size (non-deduped): 163 MB
Another benefit of doing this is that it would make the donejs-cli
code a bit more maintainable because it would remove the special casing for generator-donejs
and these generators would be added just like anything else using donejs add
.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
how to split an async generator function without losing yield ...
I want to split it into multiple functions : async *execute(): AsyncGenerator<ISyncState> { await doThis(); await ...
Read more >Node.js split() function - GeeksforGeeks
The split() function is a string function of Node.js which is used to split string into sub-strings. This function returns the output in...
Read more >Generators in Node.js: Common Misconceptions and Three ...
A generator starts in a suspended state. No console output. By invoking next() on the generator, it will execute up until it hits...
Read more >function* - JavaScript - MDN Web Docs - Mozilla
Generators are functions that can be exited and later re-entered. Their context (variable bindings) will be saved across re-entrances.
Read more >generator-jhipster-nodejs - GitHub
It is based on JHipster Blueprint , that is meant to be used in a JHipster application. The generator applies this standard configuration...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What if your app is only using
donejs-custom-elements
? Ordonejs-react-view-model
s?Obviously, these don’t exist, but it’s possible a year from now that someone using DoneJS would not need
can-component
.I don’t see a problem with installing
can-component
when you rundonejs add component
.@phillipskevin when the generator-donejs gets splitted and ssr would be optional we still could ask on donejs add app if he wan’ts to use ssr or not and if yes simply npm install that also