构建 GrapesJS 源代码。
首先,需要安装 Node.js 和 Git。然后,执行以下命令:
git clone https://github.com/artf/grapesjs.git
cd grapesjs
npm install
npm run build
以上命令会将 GrapesJS 源代码克隆到本地,并且安装相关依赖、构建项目。构建完成后,可以在 dist 目录下找到构建好的文件。
如果需要开发 GrapesJS,可以运行以下命令启动开发服务器:
npm run dev
以上命令会启动一个本地服务器,然后可以在浏览器中访问 http://localhost:8080 查看效果。
代码示例:
git clone https://github.com/artf/grapesjs.git
cd grapesjs
npm install
npm run build