Mockup是Plone5引入的旨在利用模块化的js来改善UI及功能的部件包。
The Goals of Mockup
- Standardize configuration of patterns implemented in jsto use HTML data attributes, so they can be developedwithout running a backend server.
- Use modern AMD approach to declaring dependencies on other js libs.
- Full unit testing of js
安装配置过程:
- 下载node
去到官网https://nodejs.org/en/
下载https://nodejs.org/dist/v4.4.3/node-v4.4.3-linux-x64.tar.xz
- 在github clone mockup
$ git clone https://github.com/plone/mockup.git
$ cd mockup
$ make bootstrap
- 测试
- Run tests with PhantomJS:
make test
- Run tests with Chrome:
make test-dev
- Generate widgets pot file for plone translations:
make i18n-dump
注意事项:下载的node解压后是静态包,无需编译,即可运行,并且包含 npm,根据情况,有可能需要PATH调整环境变量,包含 npm 及 node