前端构建工具
- 14. 1. npm install -g yo
2. npm install -g generator-angular
3. yo angular
many many generators
- 16. The JavaScript Task Runner
JavaScript 任务运行器
1 一个以任务处理为基础的命令行工具
2 把工作整合为不同的任务,开发时自动执行
3 完成需要重复进行的手动设置和发布任务,从而加速开发流程
4 让团队使用一套统一的命令,从而保证每个人写的代码符合统一标准
- 17. npm install -g grunt-cli
npm install grunt --save-dev
npm init
1. npm install -g grunt-init
2.git clone git://github.com/gruntjs/grunt-init-gruntfile.git
3. grunt-init grunt-init-gruntfile
grunt --version
npm install grunt-contrib-concat –save-dev
grunt concat
- 22. Bower
npm install -g bower
A package manager for the web
bower install <package>
bower init
Bower.json
bower init
bower help
- 25. Making Maven Grunt
• http://addyosmani.com/blog/making-maven-grunt/
https://github.com/wro4j/wro4j
https://code.google.com/p/wro4j/wiki/MavenPlugin
• https://github.com/allegro/grunt-maven-plugin
• https://github.com/eirslett/frontend-maven-plugin
https://github.com/bringking/requirejs-maven-plugin
Making Maven Grunt
• https://github.com/trecloux/yeoman-maven-plugin
http://wro4j.github.io/wro4j/
https://github.com/wro4j/wro4j-examples
- 27. 1 HTML标签语义化,标签结构化
2 CSS规则体系化,组件化
3 JS框架的选择,模块化,高内聚,低耦合
代码可维护性
关于代码质量控制,首先建立规范统一代码风格,在此之上可以有自动化的检查工具,同时离不开人为的Code Review。
《编写可读代码的艺术》 《编写可维护的JavaScript》
《高性能网站建设指南》 《高性能网站建设进阶指南》
Editor's Notes
- Yeoman:自耕农,自由民; 义勇骑兵队成员 Google
Bower:凉亭; 树荫处; 闺房 Twitter
澳洲bowerbird。公鸟会在交配前做一个巢。公鸟会收集某种母鸟特別喜爱的东西, 包括小花,黑苺,蜗牛壳,橡子等颜色鲜艳东東西,堆成一堆堆送給母鸟, 只是为了得到女士芳心。
Grunt: (猪等的)呼噜声; 咕哝,牢骚; 东印度野猪兽
- Yeoman: THE WEB'S SCAFFOLDING TOOL FOR MODERN WEBAPPS
Bower: A package manager for the web
- Gradle是一个基于Apache Ant和Apache Maven概念的项目自动化建构工具。它使用一种基于Groovy的特定领域语言来声明项目设置,而不是传统的XML。
- Web1.0-- 信息共享 Web2.0-- 信息共建 Web3.0-- 知识传承
Web4.0-- 知识分配 Web5.0-- 语用网 Web6.0-- 物联网
2013年4月推出 “工业4.0” 项目-面向2020年的德国制造业发展战略……
- 前端工程化代表着现在的前端开发不再是那种简单而无趣的远古生物,而是一个很性感的、让你情不自禁的想要去深入的美女…….
工作流就是一系列相互衔接、自动进行的业务活动或任务。一个工作流包括一组活动及它们的相互顺序关系,还包括流程及活动的启动和终止条件,以及对每个活动的描述。
- Yo --version
- http://wkylin.github.io/assets/gruntjs/gruntjs.html#/title
http://wkylin.github.io/GruntJs/