Pantheon's command line interface for creating and adding on to new projects.
A node-plop
based cli, heavily inspired by various create-
apps including
create-sitecore-jss
,
create-astro
,
and create-create-app
.
To install this package locally, run the following commands from the root of the monorepo.
# build the package
pnpm build:cli
# run the bin script
node ./packages/create-pantheon-decoupled-kit/dist/bin.js
<!-- TODO: this is mostly verified but need to confirm check. npm definitely works. -->Or, install the local package globally with npm
Note: We are using npm
here
because pnpm
does not support locally installed create-
packages
npm install --global ./packages/create-pantheon-decoupled-kit
npx create-pantheon-decoupled-kit
Use the create command to initiate the cli with no arguments and follow the prompts in your terminal
pnpm create pantheon-decoupled-kit
Or, pass in arguments up front to skip those prompts
pnpm create pantheon-decoupled-kit --appName my-app --dir ./my-app-dir --framework nextjs
watch
scriptTo run the watch
script, ensure there is a watch.{ts,js}
file at the root of
this package. The watch file should export a named watchOptions
object of type
minimist.ParsedArgs
. Positional arguments in the _
array will correspond to
Generators to run. Named arguments correspond to answers to the Generator
prompts. Generators will be run in the order they are given. Any number of
generators may be run at a given time. See watch.example.ts
for an example of
watchOptions
.
Please see the Contributing guide in our monorepo to contribute to the project.
<!-- TODO: Write details for contributing to this package -->