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
localDir (any)
setLocalDir (string) new localDir name

setGlobalDir

Set the instance globalDir

setGlobalDir(globalDir: any, setGlobalDir: string)
Parameters
globalDir (any)
setGlobalDir (string) new globalDir name

read

Read the configs Daults to local, global, null

read(extensions: Array<string>)
Parameters
extensions (Array<string>) array of extensions

readLocal

Read the local configs

readLocal(extensions: Array<string>)
Parameters
extensions (Array<string>) array of extensions

readGlobal

Read the global configs

readGlobal(extensions: Array<string>)
Parameters
extensions (Array<string>) array of extensions

outputLocal

Output the local configs

outputLocal(data: Object, extensions: Array<string>, options: Object?)
Parameters
data (Object = {}) data to output
extensions (Array<string>) array of extensions
options (Object?) output options
Name Description
options.spacing (string | number) (default 2) Define the number of spaces or \t

outputGlobal

Output the global configs

outputGlobal(data: Object, extensions: Array<string>, options: Object?)
Parameters
data (Object = {}) data to output
extensions (Array<string>) array of extensions
options (Object?) output options
Name Description
options.spacing (string | number) (default 2) Define the number of spaces or \t

removeLocal

Remove the local configs

removeLocal(extensions: Array<string>)
Parameters
extensions (Array<string>) array of extensions

removeGlobal

Remove the global configs

removeGlobal(extensions: Array<string>)
Parameters
extensions (Array<string>) array of extensions

removeGlobalDir

Remove the global dir

removeGlobalDir()

extensions

Output one files by extensions

extensions(dirname: string, fileRoot: string, data: Object, extensions: Array<string>, options: Object?)
Parameters
dirname (string) folder path
fileRoot (string) file root name
data (Object) data object
extensions (Array<string> = []) file extensions
options (Object? = {}) output options

extension

Output one file by extension

extension(dirname: string, fileRoot: string, data: Object, extension: string, options: Object?)
Parameters
dirname (string) folder path
fileRoot (string) file root name
data (Object) data object
extension (string) file extension
options (Object? = {}) output options

json

Output json file

json(dirname: string, fileRoot: string, data: Object, options: Object?)
Parameters
dirname (string) folder path
fileRoot (string) file root name
data (Object) data object
options (Object? = {}) output options
Name Description
options.spacing (string | number) (default 2) Define the number of spaces or \t

js

Output js file

js(dirname: string, fileRoot: string, data: Object, options: Object?)
Parameters
dirname (string) folder path
fileRoot (string) file root name
data (Object) data object
options (Object? = {}) output options
Name Description
options.spacing (string | number) (default 2) number of spaces or \t

env

Output env file

env(dirname: string, fileRoot: string, data: Object, options: Object?)
Parameters
dirname (string) folder path
fileRoot (string) file root name
data (Object) data object
options (Object? = {}) output options

yml

Output yaml file

yml(dirname: string, fileRoot: string, data: Object, options: Object?)
Parameters
dirname (string) folder path
fileRoot (string) file root name
data (Object) data object
options (Object? = {}) output options
Name Description
options.spacing number (default 2) number of spaces

findOne

Find and read one file

findOne(dirname: string, fileRoot: string, extensions: Array<string>, options: Object?)
Parameters
dirname (string) folder path
fileRoot (string) file root name
extensions (Array<string> = []) file extensions
options (Object? = {}) parse options

extension

Find one file by extension

extension(dirname: string, fileRoot: string, extension: string, options: Object?)
Parameters
dirname (string) folder path
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

json(dirname: string, fileRoot: string, options: Object?)
Parameters
dirname (string) folder path
fileRoot (string) file root name
options (Object? = {}) parse options

js

Read js file Parse options - github.com/jprichardson/node-jsonfile#readfilefilename-options-callback

js(dirname: string, fileRoot: string, options: Object?)
Parameters
dirname (string) folder path
fileRoot (string) file root name
options (Object? = {}) parse options

env

Read env file

env(dirname: string, fileRoot: string, options: Object?)
Parameters
dirname (string) folder path
fileRoot (string) file root name
options (Object? = {}) parse options

yml

Read yaml file

yml(dirname: string, fileRoot: string, options: Object?)
Parameters
dirname (string) folder path
fileRoot (string) file root name
options (Object? = {}) parse options

extensions

Output one files by extensions

extensions(dirname: string, fileRoot: string, extensions: string, options: Object?)
Parameters
dirname (string) folder path
fileRoot (string) file root name
extensions (string = []) file extensions
options (Object? = {}) remove options

extension

Find one file by extension

extension(dirname: string, fileRoot: string, extension: string, options: Object?)
Parameters
dirname (string) folder path
fileRoot (string) file root name
extension (string) file extension
options (Object? = {}) remove options

dir

Remove directory

dir(dirname: string, options: any)
Parameters
dirname (string) folder path
options (any = {})