-
-
Notifications
You must be signed in to change notification settings - Fork 727
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(create-start): readme changes and little fixes (#3142)
- Loading branch information
1 parent
9c9d0f4
commit e39eee5
Showing
4 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# @tanstack/create-start | ||
|
||
CLI tool for creating and modifying TanStack Start projects. | ||
|
||
``` | ||
pnpm create @tanstack/start | ||
``` | ||
|
||
Run | ||
|
||
``` | ||
pnpm create @tanstack/start --help | ||
``` | ||
|
||
to see all options. | ||
|
||
Until peer dependency issues are worked out, `npm create @tanstack/start` doesn't work. | ||
|
||
Use pnpm or maybe a bundled version could be published instead. | ||
|
||
# Contributing | ||
|
||
## Modules | ||
|
||
Modules represent templates and functionality that can be added later to a TanStack Start project. A module is created using a chain of methods specifying callbacks which receives arguments from the previous step. | ||
|
||
- `createModule(schema)`: Set the schema of values that will be passed in from command line options. | ||
|
||
- `.init((configFromSchema) => { ... })`: Crawl the filesystem to infer configuration, for example detecting the current package manager | ||
|
||
- `.prompt((configFromInit) => { ... })`: Prompt the user for configuration, skipping config that has already been specified. | ||
|
||
- `.validateAndApply({ validate, apply })` | ||
|
||
- `validate({ cfg, targetPath })`: check if preconditions met (is there a package.json? is a library already installed?) and return an array of strings that are issues to address | ||
|
||
- `apply({ cfg, targetPath })`: modify the filesystem: install libraries, modify files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters