运行示例前请先在命令行运行
npm install安装Node模块!
-
无需编译直接运行的情况
- 手工测试
浏览器直接打开browser_test/browser/index.html - 运行
npm run browser
自动进行Phantomjs,Chrome,Firefox的测试,并一直启动着测试进程,修改源文件,自动测试。输出覆盖率报告到coverage_browser/Icov-report/index.html - 运行
npm run browser-once
进行Phantomjs,Chrome,Firefox的测试。输出覆盖率报告到coverage_browser/Icov-report/index.html
- 手工测试
-
需Webpack做打包编译的情况
- 浏览器中测试
运行node test-server.js,浏览器打开http://localhost:3000/test.html - Node环境测试
运行npm test
- 浏览器中测试
运行npm test
运行npm run cover,输出覆盖率报告到coverage/Icov-report/index.html
- ES5
- ES6
未来前端的工程化体系核心
- Plugins
- 插件化体系,灵活
- Loaders
- 支持各种静态资源
- Code Splitting
- 代码分块,按需加载,性能优秀
- Development Tools
- 开发服务器,SourceMap,模块热重载
- Performance
- 异步IO,缓存
- Support
- AMD, CommonJS, ES6
- Optimizations
- 压缩,分块,多入口,hash
- Multiple targets
- Web, WebWorkers, Node