Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/cli/src/bin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#! /usr/bin/env node

/**
* This file will get referenced under `bin` in the `package.json` file and when loaded immediately executes the CLI.
* For exports of logic and types please use the `index` entry point.
*/

import { cli } from './index';
import { hideBin } from 'yargs/helpers';

Expand Down
4 changes: 4 additions & 0 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* This file will get referenced under `main` in the `package.json` file
* and maintains exports of logic and types.
*/
import { yargsCli } from './lib/cli';
import { yargsGlobalOptionsDefinition } from './lib/options';
import { middlewares } from './lib/middlewares';
Expand Down
8 changes: 7 additions & 1 deletion packages/cli/src/lib/commands.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { CommandModule } from 'yargs';
import { yargsCollectCommandObject } from './collect/command-object';

export const commands: CommandModule[] = [yargsCollectCommandObject()];
export const commands: CommandModule[] = [
{
...yargsCollectCommandObject(),
command: '*',
},
yargsCollectCommandObject(),
];