-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05b9ed1
commit 5f1728a
Showing
7 changed files
with
122 additions
and
31 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env node | ||
|
||
// eslint-disable-next-line n/no-missing-import | ||
import { generateTemplateRegistry } from "../dist/generate-template-registry.js"; | ||
import { cli } from "../dist/cli.js"; | ||
|
||
generateTemplateRegistry(); | ||
cli(); |
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 |
---|---|---|
|
@@ -32,13 +32,15 @@ | |
"change-case": "^5.4.3", | ||
"execa": "^8.0.1", | ||
"fast-glob": "^3.3.2", | ||
"fs-extra": "^11.2.0" | ||
"fs-extra": "^11.2.0", | ||
"yargs": "^17.7.2" | ||
}, | ||
"devDependencies": { | ||
"@release-it-plugins/lerna-changelog": "^6.1.0", | ||
"@types/fs-extra": "^11.0.4", | ||
"@types/node": "^20.11.20", | ||
"@types/recursive-readdir": "^2.2.4", | ||
"@types/yargs": "^17.0.32", | ||
"@typescript-eslint/eslint-plugin": "^7.1.0", | ||
"@typescript-eslint/parser": "^7.1.0", | ||
"@vitest/coverage-v8": "^1.2.2", | ||
|
@@ -50,6 +52,7 @@ | |
"release-it": "^17.0.3", | ||
"type-fest": "^4.10.3", | ||
"typescript": "^5.3.3", | ||
"uuid": "^9.0.1", | ||
"vitest": "^1.2.2" | ||
}, | ||
"packageManager": "[email protected]", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,17 @@ | ||
import { cwd } from "node:process"; | ||
import { hideBin } from "yargs/helpers"; | ||
import yargs from "yargs/yargs"; | ||
import { generateTemplateRegistry } from "./generate-template-registry.js"; | ||
|
||
export async function cli() { | ||
const options = await yargs(hideBin(process.argv)) | ||
.options({ | ||
path: { | ||
describe: "Custom path to save the template registry file to", | ||
type: "string", | ||
}, | ||
}) | ||
.strict().argv; | ||
|
||
await generateTemplateRegistry(cwd(), { path: options.path }); | ||
} |
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
33 changes: 33 additions & 0 deletions
33
test/__snapshots__/generate-template-registry.test.ts.snap
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