Skip to content

Commit

Permalink
fix(cli): convert bing file to ts esm
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherPHolder committed Apr 26, 2024
1 parent 60a330f commit c1c1661
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"tslib": "^2.3.1",
"yargs": "^17.7.2",
"typescript": "^4.6.3",
"lighthouse": "^9.6.7",
"lighthouse": "^11.7.1",
"puppeteer": "^19.0.0",
"@puppeteer/replay": "^1.3.1",
"prettier": "2.6.2",
"prettier": "^3.2.5",
"enquirer": "^2.3.6",
"concurrently": "^7.1.0"
}
Expand Down
1 change: 0 additions & 1 deletion packages/cli/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"assets": [
"README.md",
"packages/cli/*.md",
"packages/cli/src/cli.js",
"packages/cli/*.schema.json",
"packages/cli/**/static/**"
]
Expand Down
5 changes: 0 additions & 5 deletions packages/cli/src/cli.js

This file was deleted.

6 changes: 6 additions & 0 deletions packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env node
'use strict';

import bootCli from './lib/boot-cli.js';

await bootCli();
5 changes: 3 additions & 2 deletions packages/cli/src/lib/boot-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ function configParser(rcPath?: string): {} {
return { ...globalConfig, ...rcConfig };
}

(async () => runCli({
export default async () => await runCli({
commands: commands,
options: {...GLOBAL_OPTIONS_YARGS_CFG},
configParser }))();
configParser
});
3 changes: 1 addition & 2 deletions packages/cli/src/lib/core/yargs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export function runCli(cliCfg: {
options: { [key: string]: Options };
configParser: Options['configParser'];
}) {
// apply `.argv` to get args as plain obj available
setupYargs(cliCfg.commands, cliCfg.options, cliCfg.configParser).argv;
return setupYargs(cliCfg.commands, cliCfg.options, cliCfg.configParser).parse();
}

2 changes: 1 addition & 1 deletion packages/cli/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"**/*.test.ts",
"**/static/**",
"**/test-data/**",
"jest.config.ts"
"vite.config.ts"
]
}

0 comments on commit c1c1661

Please sign in to comment.