Skip to main content

Using the component in Zint

When the component is developed and tested in the browser, it will have to be built and deployed.

First let's build it in production mode:

yarn build

And then deploy it. This is very easy: simply copy the dist folder in $HOME/.zint/components to be able to use it from Zint.

important

The folder's name in $HOME/.zint/components will be the name by which the component can be called.

so if we do:

cp -r dist $HOME/.zint/components/newComponent

we're then able to use the component by typing:

some_command_generating_data | zint newComponent
tip

It's also possible to create a symbolic link instead of copying the dist folder:

ln -s $PWD/dist $HOME/.zint/components/newComponent

This way we can regularly improve and rebuild the component and Zint will always use the latest version

Publish your component

As we could see above distributing the component simply consists in distributing the dist folder and other users can install it in their $HOME/.zint/components folder.