Import Components using Locofy CLI
Install Locofy CLI
npm install @locofy/cli -gNote: The minimum version of Node required is 18.
Using Locofy CLI
- Install the Locofy CLI using
npm install @locofy/cli -g - If your framework is Angular install the Angular CLI using
npm install @angular/cli -g - Navigate to the root folder of your codebase
- If your framework is Angular install the Angular Elements using
npm install @angular/elements --save - Use
locofy initcommand to create alocofy.config.jsonto configure your custom components. - Use
locofy pushcommand to push your components from the local codebase to Locofy. - In the plugin press the button
I have completed all the stepsand all the components pushed from CLI will be pulled into the Locofy Plugin. - If you want to resync the component library, update the
locofy.config.jsonand uselocofy pushcommand to push the updates to Locofy.
Note: Learn how to structure your locofy.config.json file here.
Locofy CLI Commands
locofy loginUse this command to log in to Locofy.
locofy logoutUse this command to log out of Locofy.
locofy initUse 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 pushUse this command to push the custom components to Locofy.
Note: Learn how to manually map your props in this documentation.
Note: View this documentation if you are facing any errors.