GrapesJS CLI is a command-line interface tool designed to streamline the development of GrapesJS plugins. It handles the complexities of setting up modern JavaScript build tools such as Webpack and Babel, providing a simplified and accelerated workflow for plugin authors. The current stable version, 4.1.3, focuses on dependency updates and build enhancements like the `dts` option. Historically, the CLI has undergone significant updates, including a transition to Webpack 5 in v3.0.0 and a move away from the `esm` package for internal bundling in v4.1.0, which can impact custom configurations. Its release cadence generally aligns with major GrapesJS ecosystem changes or critical dependency updates. Key differentiators for `grapesjs-cli` include its opinionated, zero-configuration approach for common plugin development scenarios, direct integration with the GrapesJS plugin structure, and features like fast project scaffolding and a built-in development server. It aims to reduce the boilerplate and configuration overhead for developers, allowing them to focus on the core plugin logic.
npm install grapesjs-cliVerified import paths — ran on the pinned version, not inferred.
Demonstrates the typical GrapesJS plugin development workflow including project initialization, serving, building, and an example of customizing the Webpack configuration using TypeScript types.
Review your `webpack.config.js` against Webpack 5 documentation and update deprecated options, loaders, and plugins.
Update the `main` field in your plugin's `package.json` to point to `dist/index.js`.
Upgrade your Node.js environment to version 14.15.0 or later.
No direct fix for users, but if experiencing unexpected build issues, ensure your environment and custom scripts are compatible with a self-bundled CLI.
Ensure your `webpack.config.js` exports a function: `export default ({ config }) => { /* ... */ return { ...config, /* ... */ }; }`.Use the `--devServer` flag with a JSON string, e.g., `npx grapesjs-cli serve --devServer='{"https": true}'`.Refer to the Webpack 5 migration guide and update your custom `webpack.config.js` to use current options and syntax.
Update your `package.json` `main` field to `dist/index.js`.
Ensure you have an `index.js` or `index.ts` file located directly under the `src/` directory of your plugin project.
Upgrade your Node.js installation to version 14.15.0 or newer.
No dependency data recorded yet.