Skip to content

Commit

Permalink
chore: document yargs-ahoy.js
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkli committed Dec 27, 2024
1 parent 65be7ae commit 76c2863
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/yargs-ahoy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
* governing permissions and limitations under the License.
*/

/**
* This is a micro lib to improve the yargs cli library.
*/

import { statSync } from 'node:fs';
import path from 'node:path';
import chalk from 'chalk';
Expand Down Expand Up @@ -126,6 +130,16 @@ function handleAdditionalTypes(_yargs, opt) {

/**
* An improved yargs.
*
* Usage:
* ```js
* import yargsAhoy from './yargs-ahoy.js';
*
* const yargs = yargsAhoy();
* await yargs
* .options(..)
* .run();
* ```
*/
// biome-ignore lint/style/noDefaultExport: we mimic yargs here
export default function yargsAhoy(processArgs, cwd, parentRequire) {
Expand Down

0 comments on commit 76c2863

Please sign in to comment.