0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/packages/create-start
History 2025-03-02 16:15:53 +00:00
..
src fix: move to react-start (#3573) 2025-02-26 11:16:23 +01:00
tests/e2e fix: move to react-start (#3573) 2025-02-26 11:16:23 +01:00
.gitignore feat(start): create-start cli (#2920) 2024-12-20 00:36:02 +01:00
build.config.ts feat(start): create-start cli (#2920) 2024-12-20 00:36:02 +01:00
copyTemplates.mjs feat(start): create-start cli (#2920) 2024-12-20 00:36:02 +01:00
eslint.config.js fix(create-start): readme changes and little fixes (#3142) 2025-01-13 06:26:20 +13:00
index.js feat(start): create-start cli (#2920) 2024-12-20 00:36:02 +01:00
package.json release: v1.112.6 2025-03-02 16:15:53 +00:00
README.md fix(create-start): readme changes and little fixes (#3142) 2025-01-13 06:26:20 +13:00
tsconfig.json feat(start): create-start cli (#2920) 2024-12-20 00:36:02 +01:00
vitest.config.ts feat(start): create-start cli (#2920) 2024-12-20 00:36:02 +01:00

@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