-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added the create-keystone-app CLI argument documentation #2278
Changes from 6 commits
46b6b6c
42d9666
dceba69
2bec53d
18cfb4f
3040109
4fa6571
5ea76ae
a6ef9af
0d7c1ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,15 +6,41 @@ title: Create Keystone App | |
|
||
# Create Keystone App | ||
|
||
A cli for Keystone 5 to help generate starter apps. | ||
A CLI for Keystone 5 to help generate starter apps. | ||
|
||
## Usage | ||
|
||
### Arguments | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's move the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in a6ef9af |
||
|
||
| Argument | Type | Description | | ||
| :----------- | :-------- | :--------------------------------------------------------------------------------------------------------------------------- | | ||
| `--name` | `String` | The Keystone app name visible in the Admin UI and page titles. | | ||
| `--template` | `String` | One of the existing app templates (folder name). For example: `starter`, `todo`, etc. | | ||
| `--adapter` | `String` | One of the adapters listed in the app template. Usually one of: `Mongoose`, `Knex`. | | ||
| `--dry-run` | `Boolean` | Will go through the app generation process validating the user inputs or CLI arguments but in the end no app will be generated. | | ||
|
||
|
||
### Interactive | ||
|
||
```sh | ||
yarn create keystone-app my-app | ||
``` | ||
|
||
Follow the prompts, then: | ||
and follow the prompts. | ||
|
||
### Non-Interactive | ||
|
||
A non-interactive Keystone app creation could be useful in unattended app generation. One such example is creating a Docker image with a generated Keystone app built in. | ||
|
||
```sh | ||
npm init keystone-app --name "My App" --template "starter" --adapter "Mongoose" my-app | ||
``` | ||
|
||
The app generation will fall back to interactive prompts if any of the arguments are missing or have incorrect values. | ||
|
||
**NOTE**: By the time this documentation was written, `yarn create` was not working because the CLI arguments were not passed to the `create-keystone-app` script. | ||
|
||
## Run the App | ||
|
||
```sh | ||
cd my-app | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "@keystonejs/website", | ||
"description": "KeystoneJS documentation. Powered by Gatsby.", | ||
"private": true, | ||
"version": "5.0.4", | ||
"version": "5.0.5", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our release bot will increment this number for us, based on the contents of the changeset. Instead of incrementing this number manually, run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reverted in 5ea76ae There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changeset added in 0d7c1ac |
||
"author": "The KeystoneJS Development Team", | ||
"repository": "https://github.com/keystonejs/keystone.git", | ||
"homepage": "https://github.com/keystonejs/keystone", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍