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-cli
API
parseConfigFile
A basic config file parser.
Parameters
-
path
string 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
-
path
string 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
-
f
Function 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.