File tree 2 files changed +8
-29
lines changed
2 files changed +8
-29
lines changed Original file line number Diff line number Diff line change @@ -36,20 +36,6 @@ Examples:
36
36
```
37
37
shep config
38
38
39
- Commands:
40
- list List environment variables on AWS for an alias
41
- remove <vars...> Remove environment variables for alias on AWS
42
- set <vars...> Set environment variables for alias on AWS
43
- sync Syncs environments across all functions on a shep project
44
-
45
- Options:
46
- --version Show version number [boolean]
47
- --help Show help [boolean]
48
- ```
49
- #### ` shep config `
50
- ```
51
- shep config
52
-
53
39
Commands:
54
40
list List environment variables on AWS for an alias
55
41
remove <vars...> Remove environment variables for alias on AWS
@@ -150,19 +136,6 @@ Examples:
150
136
```
151
137
shep generate
152
138
153
- Commands:
154
- endpoint [path] Generate a new API endpoint
155
- function [name] Generate a new function
156
- webpack Generates a webpack.config.js with default template
157
-
158
- Options:
159
- --version Show version number [boolean]
160
- --help Show help [boolean]
161
- ```
162
- #### ` shep generate `
163
- ```
164
- shep generate
165
-
166
139
Commands:
167
140
endpoint [path] Generate a new API endpoint
168
141
function [name] Generate a new function
Original file line number Diff line number Diff line change @@ -7,8 +7,10 @@ console.log(execSync(`./cli.js --help`).toString().replace(/cli\.js/, 'shep').tr
7
7
console . log ( '```' )
8
8
9
9
const commandDir = './src/commands'
10
- const mainCommands = readdirSync ( commandDir )
11
- const subCommands = mainCommands
10
+ const allFiles = readdirSync ( commandDir )
11
+ const mainCommands = allFiles
12
+ . filter ( isFile )
13
+ const subCommands = allFiles
12
14
. filter ( isDir )
13
15
. map ( findSubCommands )
14
16
. reduce ( flatten )
@@ -26,6 +28,10 @@ function isDir (path) {
26
28
return statSync ( `${ commandDir } /${ path } ` ) . isDirectory ( )
27
29
}
28
30
31
+ function isFile ( path ) {
32
+ return statSync ( `${ commandDir } /${ path } ` ) . isFile ( )
33
+ }
34
+
29
35
function findSubCommands ( path ) {
30
36
return readdirSync ( `${ commandDir } /${ path } ` )
31
37
. map ( ( c ) => `${ path } ${ c } ` )
You can’t perform that action at this time.
0 commit comments