ProjectEvergreen/greenwood

`init` scaffolding should prompt for installing Greenwood plugins

Aperta

#1270 aperta il 29 ago 2024

 (2 commenti) (1 reazione) (1 assegnatario)JavaScript (15 fork)auto 404
Initdocumentationfeaturegood first issue

Metriche repository

Star
 (132 stelle)
Metriche merge PR
 (Merge medio 25g 20h) (29 PR mergiate in 30 g)

Descrizione

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

Guida contributor