Finsemble: Using The CLI

Command Line Interface (CLI) Reference

The CLI is a collection of node scripts to make quick work of creating the skeleton for new components and FSBL Clients. This overview explains how to setup the CLI and describes the function of each command.

Setup

After downloading Finsemble, run:

npm install and npm install -g @chartiq/finsemble-cli.

After installed you can run:

> finsemble-cli

Run the command without any argument to see example commands.

CLI Actions


Add A Component

> finsemble-cli add component <yourComponentName>

This command does two things for you:

  1. It creates a new component with the recommended directory structure.

     src/components/
         └──yourComponentName/
             └──yourComponentName.html
             └──yourComponentName.css
             └──yourComponentName.js
    
  2. It adds your component to configs/componentList.json with default options added.

Add A React Component

> 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

For more on customizing your component after it's been created, see our "Creating Your First Component Tutorial".

Add A Microservice

> finsemble-cli add service <yourServiceName> --create-client=true

Creates boilerplate for your service. Use --create-client=true to automatically create the corresponding client API boilerplate.

    src/services/
        └──yourServiceName/
            └──yourServiceName.html
            └──yourServiceNameService.js
    src/clients/
        └──yourServiceNameClient.js