ProjectEvergreen/greenwood

`init` scaffolding should prompt for installing Greenwood plugins

Aberta

#1.270 aberto em 29 de ago. de 2024

 (2 comentários) (1 reação) (1 responsável)JavaScript (15 forks)auto 404
Initdocumentationfeaturegood first issue

Métricas do repositório

Stars
 (132 estrelas)
Métricas de merge de PR
 (Mesclagem média 25d 20h) (29 fundiu PRs em 30d)

Description

Summary

Coming out of #1253, I think to continue making the Init scaffolding tool more valuable, we should add prompts to auto install Greenwood plugins like Raw, PostCSS, and others

Something like this, using checkboxes

➜  Workspace npx @greenwood/init@latest
Need to install the following packages:
  @greenwood/init@0.29.3
Ok to proceed? (y) y
-------------------------------------------------------
Initialize Greenwood Template ♻️
-------------------------------------------------------
(node:57730) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
? What plugins would you like to install? (Use arrow keys)
( ) PostCSS
(.) Lit SSR
( ) Raw
( ) None

Details

Once we get the user's selections, we would then need to

  1. Put the packages in package.json
  2. Configure their greenwood.config.(js|ts) file

Not really sure how we would do this via flags though?

$ npx @greenwood/init@latest --plugins postcss,litssr,xxx

Probably not that big a deal if we need to add that as a follow up feature, though

Guia do colaborador