Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do we support composite/nested project types? #9

Open
ashleydavis opened this issue May 22, 2021 · 6 comments
Open

How do we support composite/nested project types? #9

ashleydavis opened this issue May 22, 2021 · 6 comments

Comments

@ashleydavis
Copy link
Member

ashleydavis commented May 22, 2021

It would be great to support nested project types / plugins.

For example when creating a Node.js project it would be good to choose a framework (Express, Hapi, etc) and a test framework (eg Jest or Mocha).

Are these separate plugins:

  • nodejs-express-jest
  • nodejs-express-mocha
  • nodejs-hapi-jest
  • nodejs-hapi-mocha

Or do we have a nested structure for plugins:

  • nodejs
    • framework
      • express
      • hapi
    • testing
      • jest
      • mocha

This needs some thought and prototyping.

This could possibly work like the "layers" concept in Docker.

@nickdotht
Copy link
Member

nickdotht commented May 24, 2021

I vote for the first one. i.e.:

  • Through a Nodejs plugin, I get the option to pick a framework. Or no framework if I don't need any or if I don't see the one I want - At this point, I can either request the plugin developer to add it while I simply add it once my project is generated.
  • Same for a Python plugin

The simple fact that we're currently using Dockerfiles directly for plugins makes composite plugins unnecessary imho.

Someone else may even create another plugin that's specifically for Expressjs.

@ashleydavis
Copy link
Member Author

Yes I'm inclined to keep it simple and use the first option.

But it would be nice to have a set of questions that produces the name. So the user chooses Node.js from the menu, then chooses Express and then choose Jest. This could be implemented through the manifest somehow.

We need to figure out how this would work before we can resolve this decision.

@ashleydavis
Copy link
Member Author

ashleydavis commented May 24, 2021

I do like the "layers" idea that's used in Docker.

Maybe that could work in this regard?

The Express plugin is just a layer on the Node.js plugin.

The Jest plugin also is a layer on the Node.js plugin.

So there would still be a flat list of plugins... but each plugin has the option to be dependent on another one.

Just like how Dockerfiles can have a FROM instruction and be dependent on another Docker image.

@ashleydavis
Copy link
Member Author

By the way, there's no need to resolve this right away.

For the next tech demo I just want to have two plugins working. We can worry about this afterwards.

@nickdotht
Copy link
Member

The Express plugin is just a layer on the Node.js plugin.

In the context of Doulevo, this will involve updating file contents. Unless most of it happens manually.

@ashleydavis
Copy link
Member Author

I'm not sure how it would work. It's almost like the Express plugin would have to do an npm install express on top of the Node.js plugin.

It's getting complicated! Let's just sit on this anyway a good idea might come up in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants