Flexmonster CLI: why and how?
If you have already decided to use Flexmonster, then the next choice you will need to make is how to get the tool. Recently we added a new way to download Flexmonster packages. We made this change to make it easier and quicker to start the work with our component.
Before, Flexmonster offered only three options:
- from CDN;
- via npm;
- from the download package.
All of them remain working and you can use them at any time. But CLI has a few advantages compared to other options:
- You don't need to redownload packages each time you want to update Flexmonster.
- You don't need to manually add files when creating new projects.
- You can integrate the pivot table with different frameworks more easily.
- And you can do all these things and even more using just a one-line command.
What Flexmonster CLI is
So, let's figure out what Flexmonster CLI is and how it works.
Flexmonster command-line interface is the most convenient way to get and use Flexmonster Pivot. The main idea of this approach was to make it easier for developers to access the component and its updates. All you need for this is just Node.js and npm.
Using one line, you can install Flexmonster CLI globally:
After this, you will be able to use new flexmonster commands in the console.
Some may not like using the console, but in reality, it actually makes your development a lot quicker and easier. Moreover, on the Flexmonster website, there is a simple and understandable step-by-step guide on how to install and use CLI so you won't have any problems.
So now it's time to get Flexmonster Pivot to your project:
Running this command from the folder with package.json, you download Flexmonster to node_modules/ and add it as a dependency to your project.
Also, you can add it with a framework wrapper - React, Angular, or Vue.
See? Just in two steps, you have Flexmonster Pivot in your project. But what else can Flexmonster CLI do?
There are four more commands that you can run:
To use each of them, you need to write just one line, and you will receive everything you wanted almost immediately - no extra moves to find a package or create a project. Just like this:
If you have some questions and want to know more about Flexmonster CLI usage, you can also look at the documentation on our website.
So now you know everything about working with the CLI and it's time to try Flexmonster Pivot out!