The gitbook plugin is just an NPM module. You can use the npm module development method locally in the development of the gitbook plugin.
Npm provides a link command to handle this situation.
First, in your gitbook plugins folder, run the command below to create a globally installed symbolic link to your plugin:
npm link
Next, in the gitbook folder, run the following command to link the global gitbook-plugin-name symbolic link in the gitbook node_modules folder:
npm link gitbook-plugin-name
Set up your plugin in book.json . Now you can test the plugin in your gitbook without publishing.
source share