Runs a local web server serving a content of the current directory or selected path and observers for changes to any of the project files. When change occur it updates API console data.
It can use API console sources from latest release, specific tag version, remote location of console's sources or local version of the console.
The fastest option to run the command is to have a local copy of the API console
sources with installed bower dependencies. Go to the api console repository
and download latest release. Unpack it anywhere on you local filesystem and inside
unpacked directory run bower install command. (Install bower if required).
When ready use --source option to point to the sources directory.
Otherwise the command will determine latest release version, download it, install bower and then the dependencies
each time you run the command.
$ api-console dev [OPTIONS] <path to raml file>
Type: String
Required.
Path to a main RAML file.
If --project-root option is specified then the <raml> file must be inside project root path.
Type: String
API project folder location. Any change made to this location - including subfolders - cause regeneration of data and update to the running instances of the API console.
Type: String
Source of the API console to use. By default this will use latest released version on GitHub. If set and the value is an URL, it must point to a zip file and will set the --source-is-zip option automatically. If points to a local path it can be either a folder or to a zip file with the API Console sources. In later case you must set --source-is-zip option to unpack the file.
Type: Boolean
Set this option if the API console source (--source) points to a zip file that should be uncompressed. If the --source is an URL then it will be set automatically.
Type: String
Release tag name to use to build the console. To be used to build specific release of the console. Only versions >= 4.0.0.
Type: String
Host name of the web server.
Type: Number
Port name of the server.
Type: Boolean
If set to true it skips bower components installation. Use it if the src property points to the api-console sources with all dependencies installed.
Type: Boolean
If set it opens browser window when console is ready.
Type: Boolean
Prints the debug output.
This command uses api-console-dev-preview package to perform the task. The module uses raml-js-data-provider module to observe changes to the project main folder and push changes to clients listening on a web socket.
This command is stable but any comments and feature requests are welcome. Please, file an issue report for errors and feature request if there's anything we could do better.