Skip to content

Commit

Permalink
Add bin application (incomplete)
Browse files Browse the repository at this point in the history
  • Loading branch information
aedart committed Oct 7, 2024
1 parent 06e62ab commit 62eee46
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
25 changes: 25 additions & 0 deletions packages/cli/bin/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env node

import { program } from "commander";
import { VERSION } from "@aedart/cli";

// TODO: Incomplete... how to obtain additional commands? Should this be wrapped?

program
.version(VERSION)
.description(`Ion CLI v${VERSION}`)
.command('fisk', )
.description('Bla bla')
.argument('name', 'More bla bla')
.action((name) => {
console.info('Sweet', name);
});

// TODO: Add commands...

// Display help automatically, when no command is requested.
if (process.argv.length < 3) {
program.help();
}

await program.parseAsync();
3 changes: 3 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
"require": "./dist/cjs/cli.cjs"
}
},
"bin": {
"ion": "./bin/index.js"
},
"files": [
"dist",
"!dist/**/*.map",
Expand Down

0 comments on commit 62eee46

Please sign in to comment.