Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
grapesjs-cli
Advanced tools
Readme
A simple CLI library for helping in GrapesJS plugin development.
The goal of this package is to avoid the hassle of setting up all the dependencies and configurations for the plugin development by centralizing and speeding up the necessary steps during the process.
Create a production-ready plugin in a few simple steps.
mkdir grapesjs-my-plugin
cd grapesjs-my-plugin
npm init -y
git init
npm i -D grapesjs-cli
npx grapesjs-cli init
You can also skip all the questions with -y
option or pass all the answers via options (to see all available options run npx grapesjs-cli init --help
)
npx grapesjs-cli init -y --user=YOUR-GITHUB-USERNAME
src
directory and a bunch of other files inside your project. The src/index.js
will be the entry point of your plugin. Before starting developing your plugin run the development server and open the printed URL (eg. the default is http://localhost:8080)npx grapesjs-cli serve
If you need a custom port use the -p
option
npx grapesjs-cli serve -p 8081
Under the hood we use webpack-dev-server
and you can pass its option via CLI in this way
npx grapesjs-cli serve --devServer='{"https": true}'
grapesjs-cli build
If you need to customize the webpack configuration, you can create webpack.config.js
file in the root dir of your project and export a function, which should return the new configuration object. Check the example below.
// YOUR-PROJECT-DIR/webpack.config.js
// config is the default configuration
export default ({ config }) => {
// This is how you can distinguish the `build` command from the `serve`
const isBuild = config.mode === 'production';
return {
...config,
module: {
rules: [ { /* extra rule */ }, ...config.module.rules ],
},
};
}
Show all available commands
grapesjs-cli
Show available options for a command
grapesjs-cli COMMAND --help
Run the command
grapesjs-cli COMMAND --OPT1 --OPT2=VALUE
MIT
FAQs
GrapesJS CLI tool for the plugin development
The npm package grapesjs-cli receives a total of 1,022 weekly downloads. As such, grapesjs-cli popularity was classified as popular.
We found that grapesjs-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.