for development
适合产品原型或个人小型项目的快速开发和调试,也是示例3在开发环境中的状态。
Source code for the demo:
View on Github
How to build distribution file of the demo:
How to install Ozma.js
No build step is required
Running result of the demo:
- Open the developer console of the browser
- Refresh
Notes:
Under construction...
说明:
- 在开发环境中,修改源码后可直接调试,无需构建。
- 由oz.js动态加载所需module的源码文件。每个module的初始化都会产生一次异步请求。
- main.js中配置的distUrl在开发环境(本页)中不产生效果,仍然基于baseUrl来生成所需文件的URL。
- 发布到生产环境时,使用示例3的方法可以无缝切换:除了增加构建环节,还需要由服务器端模版将js/main.js替换为distUrl路径下的发布文件。