Skip to content

Latest commit

 

History

History
71 lines (48 loc) · 3.27 KB

Options.md

File metadata and controls

71 lines (48 loc) · 3.27 KB

Options

create-typescript-app is built on top of create. npx create typescript-app@beta supports all the flags defined by the create CLI. It provides three Presets:

  1. Minimal: Just bare starter tooling: building, formatting, linting, and type checking.
  2. Common: Bare starters plus testing and automation for all-contributors and releases.
  3. Everything: The most comprehensive tooling imaginable: sorting, spellchecking, and more!

For example, to create a new repository on the everything preset:

npx create typescript-app@beta --preset everything

create-typescript-app itself adds in two sections of flags:

Base Options

Per create > CLI > Template Options, options defined by create-typescript-app may be provided on the CLI.

Required Base Options

These options can only be inferred when running on an existing repository. Each will be prompted for when creating a new repository if not explicitly provided:

  • --description (string): 'Sentence case.' description of the repository
  • --title (string): 'Title Case' title for the repository

For example, pre-populating both required base options:

npx create typescript-app@beta --description "My awesome TypeScript app! 💖" --title "My TypeScript App"

That script will run completely autonomously, no prompted inputs required. ✨

Optional Base Options

These optional options do not need to be provided explicitly. They will be inferred from the running user, and if migrating an existing repository, its files on disk.

  • --access ("public" | "restricted"): Which npm publish --access to release npm packages with (by default, "public")
  • --author (string): Username on npm to publish packages under (by default, an existing npm author, or the currently logged in npm user, or owner.toLowerCase())
  • --bin (string): Value to set in package.json's "bin" property, per FAQs > How can I use bin?
  • --directory (string): Directory to create the repository in (by default, the same name as the repository)
  • --email (string): Email address to be listed as the point of contact in docs and packages (e.g. [email protected])
  • --funding (string): GitHub organization or username to mention in funding.yml (by default, owner)
  • --keywords (string[]): Any number of keywords to include in package.json (by default, none)
    • This can be specified any number of times, like --keywords apple --keywords "banana cherry"

For example, customizing the npm author and funding source:

npx create typescript-app@beta --author my-npm-username --funding MyGitHubOrganization

Block Exclusions

Per create > CLI > Template Options > Block Exclusions, individual Blocks may be excluded from running. For example, initializing with all tooling except for Renovate:

npx create typescript-app@beta --exclude-renovate

See Blocks.md for the list of blocks and their corresponding presets.