1.0.5 • Published 5 years ago

grapesjs-dev-helper v1.0.5

Weekly downloads
1
License
BSD-3-Clause
Repository
github
Last release
5 years ago

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.

  1. Create a folder for your plugin and init some preliminary steps
mkdir grapesjs-my-plugin
cd grapesjs-my-plugin
npm init -y
git init
  1. Install the package
npm i -D grapesjs-dev-helper
  1. 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
  1. The directory src will be created with few files inside and index.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}'
  1. 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