-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.js
54 lines (51 loc) · 1.34 KB
/
constants.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
52
53
54
const resourceTypes = {
SCREEN: "screen",
HOOK: "hook",
COMPONENT: "component",
SLICE: "slice",
REDUX: "redux",
};
const commands = {
CREATE: {
description:
"Generate a new resource (type: screen, hook, component, redux slice) with the given name",
command: "generate <type> <name>",
alias: "g",
options: {
NO_TEST: "--no-test",
/**
* Create files without creating a folder
*/
NO_DIR: "--no-dir",
NO_CONST: "--no-const",
NO_STYLE: "--no-style",
/**
* Custom path for the file(s)
*/
PATH: "--path <path>",
/**
* Use the name passed by the user as
*/
KEEP_NAME: "--keep-name",
/**
* Execute commands in dry run mode without generating/modifying any files
*/
DRY_RUN: "--dry-run",
},
},
CREATE_REDUX: {
description:
"Set up boilerplate code for redux toolkit (rootReducer, slices, store, and utilities)",
command: "redux",
options: {
/**
* Execute commands in dry run mode without generating/modifying any files
*/
DRY_RUN: "--dry-run",
},
},
};
const CLI_NAME = "rnx-gen";
const CLI_VERSION = "1.1.7";
const CLI_DESCRIPTION = "Opinionated resources generator for React Native";
export { resourceTypes, commands, CLI_NAME, CLI_VERSION, CLI_DESCRIPTION };