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

Extend neva new to be a builtin scaffolder #849

Open
emil14 opened this issue Jan 25, 2025 · 2 comments
Open

Extend neva new to be a builtin scaffolder #849

emil14 opened this issue Jan 25, 2025 · 2 comments

Comments

@emil14
Copy link
Collaborator

emil14 commented Jan 25, 2025

Problem

At the moment we have neva new command that creates new nevalang module on the disk. It looks like this:

neva new %path_to_module%

Generated module consist of only 2 files with a hello-world inside:

src/
  main.neva // <--- hello world
neva.yml    // <--- neva module manifest

It ain't much but it's an honest work but it saves you like about 1 minute of initializing the module manually. However, there are tools like yeoman, wasp, create-react-app, etc that allow to create custom templates for projects and scaffold them with cli.

Even though we don't have this problem, it sounds cool to have a builtin solution right inside official CLI tool.

Proposal

Any git-repo (or at least ones with neva.y(a)ml, we'll see) should be available as a template for neva new. Example: `neva new --template=github.com/emil14/neva-backend-layout" (let's imagine template contains boilerplate for databases, http middleware, JWT-auth, etc).

Implementation

It's not clear how exactly this should be implemented.

  1. Figure out what's the MVP - smallest and simplest functionality
  2. What's the template? Any repo? What are constraints?
  3. Should we extend builder package? Reuse git-client code from there?

Based on discussion with @Mr-Ao-Dragon and his PR #841

@emil14
Copy link
Collaborator Author

emil14 commented Feb 5, 2025

@Mr-Ao-Dragon I genuinely this is great idea and we should implement it :)

@Mr-Ao-Dragon
Copy link
Contributor

yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants