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

RFC: Move add-ons templates on template's packages to cli-tool package #119

Open
hoangmirs opened this issue Jul 27, 2022 · 1 comment
Open

Comments

@hoangmirs
Copy link
Contributor

Issue

  • We created a CLI to generate a React project. So now, our template is able to support generating multiple React templates e.g. CRA, Vite, NextJS, RemixJS
  • But now, we are putting the add-ons logic into cli-tool package and add-ons templates (base code, config files) into each template package.
  • It might be better if we move add-ons templates to cli-tool package, the folder could be packages/cli-tool/template/addons. Then we just need to copy from here to the generated project. Make sure that the generated project has a common folder structure.
  • We can test each addon by generating a simple project and checking if it can be installed on the generated project.

What's next?

If you agree with this, then we might:

  1. Create templates that have the similar folder structure
  2. Use CLI to generate a project with option: --template=cra, --template=nextjs, --template=vite
  3. Use CLI to install add-ons: install NPM package, copy files
  4. Add a postProcess function to fix linter, commit, ...
@malparty
Copy link
Member

The the "CLI to install add-ons", I think we do not need to publish an NPM package, we can directly CURL the add-ons folder and extract it :D

image

I'm doing that to download the vite template :) The nice thing is that then we can test on a specific branch (just need to push the branch changes first).

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