Skip to content

Commit 92b428c

Browse files
author
Ovidiu Barabula
committed
feat(cli): use frontvue instance in cli
1 parent 65ac477 commit 92b428c

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/cli/cli.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
import * as program from 'commander';
9+
import frontvue from '../core';
910

1011
program
1112
.version('0.1.0')
@@ -18,12 +19,26 @@ program
1819

1920
program
2021
.command('init [name]')
21-
.action(name => console.log(`Creating a new project ./${name}`))
22+
.action(async name => {
23+
console.log(`Creating a new project ./${name}`);
24+
const instance = await frontvue;
25+
instance.run('init');
26+
})
2227
.description('Initialize a new project');
2328

29+
2430
program
2531
.command('config')
2632
.description('Start configuration wizard')
2733
.action(() => console.log('Starting configuration...'));
2834

35+
36+
program
37+
.command('run [hook]')
38+
.description('Run tasks in a hook')
39+
.action(async hook => {
40+
const instance = await frontvue;
41+
instance.run(hook);
42+
});
43+
2944
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