Skip to content

Commit 7457023

Browse files
author
Ovidiu Barabula
committed
feat(cli): add basic structure for CLI tool
1 parent 41cef9b commit 7457023

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/cli/cli.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Name: cli.ts
3+
* Description: Main entry point file for CLI tool
4+
* Author: Ovidiu Barabula <lectii2008@gmail.com>
5+
* @since 0.1.0
6+
*/
7+
8+
import * as program from 'commander';
9+
10+
program
11+
.version('0.1.0')
12+
.arguments('<command>')
13+
.action(command => {
14+
if (!command) {
15+
console.log('You need to type a command as well');
16+
}
17+
});
18+
19+
program
20+
.command('init [name]')
21+
.action(name => console.log(`Creating a new project ./${name}`))
22+
.description('Initialize a new project');
23+
24+
program
25+
.command('config')
26+
.description('Start configuration wizard')
27+
.action(() => console.log('Starting configuration...'));
28+
29+
program.parse(process.argv);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy