1.0.5 • Published 5 years ago
grapesjs-dev-helper v1.0.5
GrapesJS Dev Helper
Simple CLI library for helping in GrapesJS plugin development. The goal of this package is to avoid the hassle of setting up all the necessary dependencies and configurations by centralizing all the processes necessary to create a GrapesJS plugin
Plugin from 0 to 100 (DRAFT: NOT ALL STEPS ARE READY)
Create a production-ready plugin in a few simple steps.
- Create a folder for your plugin and init some preliminary steps
mkdir grapesjs-my-plugin
cd grapesjs-my-plugin
npm init -y
git init
- Install the package
npm i -D grapesjs-dev-helper
- TODO Init your plugin project by following few steps
npx grapesjs-dev-helper init
You can also skip all the questions with -y
option
npx grapesjs-dev-helper init -y
- The directory
src
will be created with few files inside andindex.js
will be the entry point of your plugin. Before starting developing your plugin run the development server and follow the printed URL (eg. default is http://localhost:8080)
npx grapesjs-dev-helper serve
If you need a custom port use the -p
option
npx grapesjs-dev-helper serve -p 8081
Under the hood we use webpack-dev-server
and you can pass its option via CLI in this way
npx grapesjs-dev-helper serve --devServer='{"https": true}'
- Once the development is finished you can build your plugin for production
grapesjs-dev-helper build
Generic CLI usage
Show all available commands
grapesjs-dev-helper
Show available options for a command
grapesjs-dev-helper COMMAND --help
Run the command
grapesjs-dev-helper COMMAND --OPT1 --OPT2=VALUE
License
MIT