question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Split up generator-donejs

See original GitHub issue

I 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:open
  • Created 7 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
phillipskevincommented, Feb 7, 2017

What if your app is only using donejs-custom-elements? Or donejs-react-view-models?

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 run donejs add component.

0reactions
frank-dspeedcommented, Feb 13, 2017

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found