-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
executable file
·51 lines (40 loc) · 1.39 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#! /usr/bin/env node
import { program } from 'commander';
import list_created_blocks from './commands/list_created_blocks.js';
import setup_theme from './commands/setup_theme.js';
import setup_plugin from './commands/setup_plugin.js';
import create_new_block from './commands/create_new_block.js';
import remove_existing_block from './commands/remove_existing_block.js';
import { help } from './CONFIG.js';
import rename_existing_block from './commands/rename_existing_block.js';
import copy_existing_block from './commands/copy_existing_block.js';
program.command('list').description(help.list).action(list_created_blocks);
program
.command('theme <theme-name>')
.description(
'Download and set up a new theme from the latest theme-redone release'
)
.action(setup_theme);
program
.command('plugin')
.description(
'Download and set up a new plugin from the latest trbs=framework plugin release'
)
.action(setup_plugin);
program
.command('add <block-name-kebab-case>')
.description(help.add)
.action(create_new_block);
program
.command('rename <block-name> <block-new-name>')
.description(help.rename)
.action(rename_existing_block);
program
.command('copy <block-name> <new-block-name>')
.description(help.copy)
.action(copy_existing_block);
program
.command('remove <block-name-kebab-case>')
.description(help.remove)
.action(remove_existing_block);
program.parse();