@greenwood/init
Overview
Init package for scaffolding out a new Greenwood project. For more information and complete docs, please visit the Greenwood website.
Usage
Create a directory and then run the init
command to scaffold a minimal Greenwood project.
mkdir my-app && cd my-app
npx @greenwood/init
This will then output the following
├── greenwood.config.js
├── .gitignore
├── package.json
└── src/
└─ pages/
└─ index.md
API
Template
To scaffold your new project based on one of Greenwood's starter templates, pass the --template
flag and then follow the prompts to complete the scaffolding.
npx @greenwood/init --template
-------------------------------------------------------
Initialize Greenwood Template ♻️
-------------------------------------------------------
? Which template would you like to use? (Use arrow keys)
❯ blog
You can also pass the template you want from the CLI as well.
npx @greenwood/init --template=blog
NPM Install
To automatically run npm install
after scaffolding, pass the --install
flag.
npx @greenwood/init --install
Yarn Install
To automatically run yarn install
after scaffolding, pass the --yarn
flag.
npx @greenwood/init --yarn
Flags can be chained together!
$ npx @greenwood/init --template --yarn --install