The command line interface (CLI) is a collection of node scripts that make quick work of creating the skeleton for new components and
FSBL clients. This overview explains how to set up the CLI and describes the function of each command.
After downloading Finsemble, run:
npm install and
npm install -g @chartiq/finsemble-cli.
Once the CLI is installed you can run:
Run the command without any argument to see example commands.
> finsemble-cli add component <yourComponentName>
This command does two things for you:
It creates a new component with the recommended directory structure.
src/components/ └──yourComponentName/ └──yourComponentName.html └──yourComponentName.css └──yourComponentName.js
It adds your component to configs/componentList.json with default options implemented.
> finsemble-cli add component <yourComponentName> --react-component=true
Similar to the first command, this script creates the appropriate directory structure and adds your component to configs/componentList.json. It also adds your React component to the Webpack build process so that Webpack watches and rebuilds the files when they change.
Webpack gets the list of components it should watch and build from configs/componentsToBuild.json.
src/components/ └──yourComponentName/ └──src/ └──components/ └──stores/ └──app.jsx └──yourComponentName.html └──yourComponentName.css
The following command creates a boilerplate for your service:
> finsemble-cli add service <yourServiceName> --create-client=true
--create-client=true to automatically create the corresponding client API boilerplate.
src/services/ └──yourServiceName/ └──yourServiceName.html └──yourServiceNameService.js src/clients/ └──yourServiceNameClient.js
If you haven't yet installed the Finsemble seed project and gotten access to the CLI, you can do so by reading Getting Started.
You can learn more about the React controls and sample components we've made by checking out Presentation Components.