-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert create-cli.js (gatsby-cli) to TypeScript (#23650)
* chore(gatsby-cli) Add basic type annotations to create-cli.ts * Update resolve-cwd to 3.0.0 as it has TS definitions * Add @types/yargs * Add most obvious type annotations and checks to create-cli.ts * Make report.panic return "never" as it's supposed to NOTE: This still leaves a lot of any types in create-cli, especially when it comes to require('./some-local-file') expressions and parameters/options of yargs commands. Making everything type-safe might introduce a lot of complexity though, so one should think about benefits vs costs of doing this * chore(create-cli) Replace .fail with .recommendCommands * chore(gatsby-cli) Add types and type checks to command handlers NOTE: gatsby new arguments are now stringified before use. This makes the compiler happy and also it's now possible to init a gastsby project inside a folder with number as a name, in case you want to "gatsby new 42", which caused an error before * Address test failures Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
- Loading branch information
1 parent
4b332ed
commit 623bb06
Showing
10 changed files
with
109 additions
and
110 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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.