constructor
new constructor(options:
Object)
Parameters
options (Object
= {}
)
config options
Name |
Description |
options.fileRoot string
|
fileRoot name
|
options.globalDir string
|
user config directory
|
options.localDir string?
|
project directory
|
setFileRoot
Set the instance fileRoot
setFileRoot(newFileRoot:
string)
Parameters
newFileRoot (string)
new fileRoot name
setLocalDir
Set the instance localDir
setLocalDir(localDir: any, setLocalDir:
string)
Parameters
setLocalDir (string)
new localDir name
setGlobalDir
Set the instance globalDir
setGlobalDir(globalDir: any, setGlobalDir:
string)
Parameters
setGlobalDir (string)
new globalDir name
read
Read the configs
Daults to local, global, null
Parameters
readLocal
Read the local configs
Parameters
readGlobal
Read the global configs
Parameters
outputLocal
Output the local configs
Parameters
data (Object
= {}
)
data to output
options (Object?)
output options
Name |
Description |
options.spacing (string | number)
(default 2 )
|
Define the number of spaces or \t
|
outputGlobal
Output the global configs
Parameters
data (Object
= {}
)
data to output
options (Object?)
output options
Name |
Description |
options.spacing (string | number)
(default 2 )
|
Define the number of spaces or \t
|
removeLocal
Remove the local configs
Parameters
removeGlobal
Remove the global configs
Parameters
removeGlobalDir
Remove the global dir
removeGlobalDir()
extensions
Output one files by extensions
Parameters
fileRoot (string)
file root name
options (Object?
= {}
)
output options
extension
Output one file by extension
Parameters
fileRoot (string)
file root name
extension (string)
file extension
options (Object?
= {}
)
output options
json
Output json file
Parameters
fileRoot (string)
file root name
options (Object?
= {}
)
output options
Name |
Description |
options.spacing (string | number)
(default 2 )
|
Define the number of spaces or \t
|
js
Output js file
Parameters
fileRoot (string)
file root name
options (Object?
= {}
)
output options
Name |
Description |
options.spacing (string | number)
(default 2 )
|
number of spaces or \t
|
env
Output env file
Parameters
fileRoot (string)
file root name
options (Object?
= {}
)
output options
yml
Output yaml file
Parameters
fileRoot (string)
file root name
options (Object?
= {}
)
output options
Name |
Description |
options.spacing number
(default 2 )
|
number of spaces
|
findOne
Find and read one file
Parameters
fileRoot (string)
file root name
options (Object?
= {}
)
parse options
extension
Find one file by extension
Parameters
fileRoot (string)
file root name
extension (string)
file extension
options (Object?
= {}
)
parse options
json
Read json file
Parse options - github.com/jprichardson/node-jsonfile#readfilefilename-options-callback
Parameters
fileRoot (string)
file root name
options (Object?
= {}
)
parse options
js
Read js file
Parse options - github.com/jprichardson/node-jsonfile#readfilefilename-options-callback
Parameters
fileRoot (string)
file root name
options (Object?
= {}
)
parse options
env
Read env file
Parameters
fileRoot (string)
file root name
options (Object?
= {}
)
parse options
yml
Read yaml file
Parameters
fileRoot (string)
file root name
options (Object?
= {}
)
parse options
extensions
Output one files by extensions
Parameters
fileRoot (string)
file root name
extensions (string
= []
)
file extensions
options (Object?
= {}
)
remove options
extension
Find one file by extension
Parameters
fileRoot (string)
file root name
extension (string)
file extension
options (Object?
= {}
)
remove options
dir
Remove directory
dir(dirname:
string, options: any)
Parameters