File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
packages/node-modules-inspector/src/node Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ const cli = cac('node-modules-inspector')
20
20
cli
21
21
. command ( 'build' , 'Build inspector with current config file for static hosting' )
22
22
. option ( '--root <root>' , 'Root directory' , { default : process . cwd ( ) } )
23
+ . option ( '--config <config>' , 'Config file' )
23
24
. option ( '--depth <depth>' , 'Max depth to list dependencies' , { default : 25 } )
24
25
// Build specific options
25
26
. option ( '--base <baseURL>' , 'Base URL for deployment' , { default : '/' } )
37
38
storageNpmMeta,
38
39
storageNpmMetaLatest,
39
40
storagePublint,
41
+ configFile : options . config ,
40
42
mode : 'build' ,
41
43
} ) )
42
44
const rpcDump : ServerFunctionsDump = {
77
79
cli
78
80
. command ( '' , 'Start dev inspector' )
79
81
. option ( '--root <root>' , 'Root directory' , { default : process . cwd ( ) } )
82
+ . option ( '--config <config>' , 'Config file' )
80
83
. option ( '--depth <depth>' , 'Max depth to list dependencies' , { default : 25 } )
81
84
// Dev specific options
82
85
. option ( '--host <host>' , 'Host' , { default : process . env . HOST || '127.0.0.1' } )
95
98
storageNpmMeta,
96
99
storageNpmMetaLatest,
97
100
storagePublint,
101
+ configFile : options . config ,
98
102
mode : 'dev' ,
99
103
} )
100
104
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ export interface CreateServerFunctionsOptions extends
20
20
ListPackagesNpmMetaLatestOptions {
21
21
mode : 'dev' | 'build'
22
22
storagePublint ?: Storage < PublintMessage [ ] >
23
+ configFile ?: string
23
24
}
24
25
25
26
export function createServerFunctions ( options : CreateServerFunctionsOptions ) : ServerFunctions {
@@ -39,7 +40,7 @@ export function createServerFunctions(options: CreateServerFunctionsOptions): Se
39
40
cwd : options . cwd ,
40
41
sources : [
41
42
{
42
- files : 'node-modules-inspector.config' ,
43
+ files : options . configFile || 'node-modules-inspector.config' ,
43
44
} ,
44
45
] ,
45
46
defaults : {
You can’t perform that action at this time.
0 commit comments