Installation
The ToolX library offers a range of tools that can be installed individually or as part of the core package. Installation can be performed using either npm or yarn, depending on your preference.
Installing Individual Tools
To install a specific tool from the ToolX library, such as imagemin
, use the following commands:
npm i -D @toolx/imagemin
yarn add -D @toolx/imagemin
Installing the Pipeline from Core
If you require the Pipeline
functionality, it is essential to install it from the core package of ToolX. Additionally, if you plan to create a new tool using the ToolX library, the core package is also necessary. For more detailed information about these functionalities, you can refer to the official documentation of Tool and Pipeline.
npm i -D @toolx/core
yarn add -D @toolx/core
Global Installation for CLI Use
You can also install the tools globally to utilize them directly from the command line interface (CLI). This allows for the execution of ToolX tools as binary commands.
npm i -g @toolx/imagemin
yarn add global @toolx/imagemin
For example, to compress images in the directory where you run the command using the imagemin
tool, simply type the following in the CLI:
toolx-imagemin