Molecular Basic Module
基于 @molecularjs/builder 构建能够支持页面编辑的组件模块(Component)和管道逻辑(Pipeline)。
如何安装
yarn add @molecularjs/modules
npm install @molecularjs/modules --save
开发
- 在
molecularjs 目录,克隆本项目
- 切换到分支
dev/2.0
- 安装依赖
yarn
- 执行
yarn compile 构建当前modules,或使用 yarn compile:src 使用SDK源代码构建
- 执行
yarn emit 输出 demo 的产物代码,或者使用 yarn emit:src 使用SDK源代码输出
- 执行
yarn webpack:demo 构建最终产物
- 一键启动开发环境(使用SDK源代码编译,可以调试SDK部分代码): 打开终端后执行
yarn watch:bundle,再开一共终端,执行: yarn watch:pack
- 修改
scripts/demo.json 后保存,会自动重新编译,并刷新页面看到变化
- 自定义demo.json配置文件: 使用
make watch-bundle config=$(your_file_without_ext) 或 ./PS.sh1 watch-bundle config=$(your_file_without_ext) 替换 yarn watch:bundle 命令
目录简介
project
|- src
|- core
|- pipelines
|- components
|- scripts
|- demo.json
|- *.publish.js