v0.33.0-alpha.0
Pre-releaseOverview
This first release in the v0.33.0 release line introduces an overhaul to Greenwood's init scaffolding CLI, now pre-cleans all build and output directories automatically, and some fixes some misc bugs.
# npm
$ npm i -D @greenwood/cli@alpha
# Yarn 1.x (classic)
$ yarn upgrade @greenwood/cli@alpha --dev
# pnpm
$ pnpm i -D @greenwood/cli@alphaChangelog
https://github.com/ProjectEvergreen/greenwood/issues?q=label%3Av0.33.0%20label%3Aalpha.0
- adopt prompt based user experience for the
initexperience - expand package manager options for
initscaffolding - pre-clean all build output directories
- supported import map generation export condition matches are overwriting themselves
- SSR pages and layouts using custom HTML element with constructor props returns
undefinedfor compilation object
Features (Early Access)
Docs are still in progress for the init command so please see the below references for now, and please feel free to ask in Discord if you have any questions / feedback if trying these changes out early.
Init
The Init scaffolding CLI has been improved to be a prompt based experience, which will walk you through selecting a number of scaffolding options for your project's name, TypeScript configuration, and package manager installation.
# notice we are using @alpha here
$ npx @greenwood/init@alphaThere are corresponding flags for all prompts and options too, which you can see by passing the --help flag
➜ scratch npx @greenwood/init@alpha --help
-------------------------------------------------------
Initialize a Greenwood Project (v0.33.0-alpha.0) ♻️
-------------------------------------------------------
Usage: @greenwood/init [options]
Options:
-V, --version output the version number
-y, --yes Accept all default options
--name <name> Name and directory location to scaffold your application with
--ts [choice] Optionally configure your project with TypeScript (choices: "yes", "no")
-i, --install <choice> Install dependencies with the package manager of your choice (choices: "npm", "pnpm", "yarn", "no")
-h, --help display help for commandFor example, to automatically create and name a project using TypeScript and PNPM, you could use this command
$ npx @greenwood/init@latest --name my-app --ts --i pnpmBreaking Changes
Constructor Props
The signature for constructor props has changed slightly, now allowing for access to the compilation object
// before compilation was undefined
constructor(request, compilation) {
// ...
}// after, we pass an object with access to both
constructor({ request, compilation }) {
//
}Known Issues
- fix missing TS flag from Init scaffolding TS base template
- init scaffolded
versionfield in package.json is being to set to current Greenwood's current version