ProjectEvergreen/greenwood

`init` scaffolding should prompt for installing Greenwood plugins

开放

#1,270 创建于 2024年8月29日

 (2 条评论) (1 个反应) (1 位负责人)JavaScript (15 个派生)auto 404
Initdocumentationfeaturegood first issue

仓库指标

星标
 (132 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南