@intuiface/cli
v2.2.0
Published
Intuiface CLI helps you build interface assets for Intuiface
Readme
intuiface-cli
Intuiface CLI is a command line tool that helps you build Intuiface interface assets and binding converters.
This CLI generates an Intuiface Descriptor (*.ifd) file and builds the output bundle to be imported into Intuiface Composer.
Usage:
Command to build an Interface Asset:
npx intuiface-cli build -n IA_File_NameCommand to build a Binding Converter:
npx intuiface-cli build -n BC_File_Name -t binding-converter| Option | Description |
|--------------------|-------------------------------------------------------------------------------------------------|
| -n, --name <name> | Name of the interface asset's or binding converter's main file in the src/* folder (without extension). |
| -t, --type <type> | Asset type to build: interface-asset or binding-converter. Default: interface-asset. |
| -i, --icon [icon] | Path to the icon of the IA or BC displayed in Composer Interface Asset panel. |
| -d, --debug | Build in debug mode. |
| -h, --help | Display help for the command. |
To see more usage information, use the help command:
npx intuiface-cli help
npx intuiface-cli help <command>Adding an icon
If you want to add an icon to your IA or BC, add an image in your project and reference its path in the package.json file editing the build script.
"build": "npx intuiface-cli build -n [IA_File_Name|BC_File_Name] -i MyIcon.png
or
"build": "npx intuiface-cli build -n [IA_File_Name|BC_File_Name] -i ./icons/MyIcon.png
then run command
npm run buildBuild for debug
You can run the command
npm run build:debugdirectly in your project. This command will not minimize the output file in order to be easier for debug. Then in the Composer Play Mode, you can use key combination Ctrl+Shift+I
to debug.
The generated version is taken from your workspace package.json when available.
Migration to v2
For existing project created before the v2 of the intuiface-cdk, you can migrate your project.
First, update @intuiface/core to use the latest version:
npm install @intuiface/core@latestThen checks that your project still build or fix the breaking changes.
Now, you can migrate your project to use the new intuiface-cli. Install it with the command:
npm install @intuiface/clithen use the migrate command to automatically upgrade your project to be compatible with CLI:
npx intuiface-cli migrate