Custom Components
Import using CLI

Import components using Locofy CLI

Install Locofy CLI

npm install @locofy/cli -g
Note: The minimum version of Node required is 18

Using Locofy CLI

  1. Install the Locofy CLI using npm install @locofy/cli -g
  2. If your framework is Angular install the Angular CLI using npm install @angular/cli -g
  3. Navigate to the root folder of your codebase
  4. If your framework is Angular install the Angular Elements using npm install @angular/elements --save
  5. Use locofy init command to create a locofy.config.json to configure your custom components.
  6. Use locofy push command to push your components from the local codebase to Locofy.
  7. In the plugin press the button I have completed all the steps and all the components pushed from CLI will be pulled into the Locofy Plugin.
  8. If you want to resync the component library, update the locofy.config.json and use locofy push command to push the updates to Locofy.

Note: Learn how to structure your locofy.config.json file here.

Locofy CLI Commands

locofy login

Use this command to log in to Locofy.

locofy logout

Use this command to log out of Locofy.

locofy init

Use this command to create locofy.config.json to configure your custom component library. You can view our documentation on how to structure your config file here.

locofy push

Use this command to push the custom components to Locofy.

Note: View this documentation if you are facing any errors.