1.0.0-rc.2 • Published 8 years ago
littlefork-cli v1.0.0-rc.2
The Littlefork command line interface
A command line interface to Littlefork. See the Littlefork tutorial on how to use it, or print the help output.
littlefork -h
Installation
npm install -S littlefork-cliAPI
parseConfigFile
A basic config file parser.
Parameters
pathstring The path to the configuration file.
- Throws any Will throw an error if the file is missing or the JSON is invalid.
Returns (Object | Array) The parsed JSON.
parseConfigFileWithExtends
Reads a config file like parseConfigFile, but supports the extends
keyword similar to eslint. Only use it on configuration files that contain
an object, not an array of objects.
Parameters
pathstring The path to the configuration file.
- Throws any Will throw an error if the file is missing or the JSON is invalid.
Returns Object The parsed JSON.
mapFiles
Map a config parser over multiple files.
Parameters
fFunction The config file parser function.ps(string | Array<string>) A single or a list of file paths.
- Throws any Will throw an error if any file is missing or the JSON is invalid.
Returns (Object | Array) The concatenation of all config files. An array if the first config file parses as an array, otherwise and object.