ProjectEvergreen/greenwood

`init` scaffolding should prompt for installing Greenwood plugins

Open

#1,270 opened on Aug 29, 2024

 (2 comments) (1 reaction) (1 assignee)JavaScript (15 forks)auto 404
Initdocumentationfeaturegood first issue

Repository metrics

Stars
 (132 stars)
PR merge metrics
 (PR metrics pending)

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

Contributor guide