[AngularJS + Gulp] Set up Gulp
We will have accomplished a few goals, the first goal being that changes to our source files will automatically be detected and a new build will be kicked off each time.
This will include compiling our less into CSS, running JSHint to catch any Javascript errors that we may have incurred, compiling our HTML partials into a single Javascript file, injecting the proper resources into our index.html file, and then serving that build up with express and nodemon.
We will take this a step further, when we want to kick off a production build, by concatenating our source files and then minifying and uglifying them, all the while keeping things safe by using ng-annotate.
To get started with gulp:
1. You need node and npm.
2. Install gulp gloablly:
npm install -g gulp
3. Install gulp locally:
npm install --save-dev gulp
4. Create a gulpfile.js
var gulp = require('gulp'); //Default task gulp.task('default', function() { console.log("Hello Gulp"); });
5. In commend line, run:
gulp
相关文章
- Golang 实现 set 集合,变相实现 切片去重、排序 功能
- 【Linux异常】执行man proc查看proc文档时提示错误 man: can't set the locale; make sure $LC_* and $LANG are correct No manual entry for proc
- ES6学习笔记之map、set与数组、对象的对比
- Angularjs学习---官方phonecat实例学习angularjs step0 step1
- [NPM] Set default values for package.json using npm set
- Nginx proxy_set_header 理解
- 【RF库Collections测试】Set List Value
- DWZ SSH2 菜单树--使用Struts2 标签(iterator/set/if 组合使用)
- Angularjs学习---angularjs环境搭建,ubuntu 12.04下安装nodejs、npm和karma
- [NPM] Set default values for package.json using npm set
- [AngularJS + Gulp] Set up Gulp
- SAP Structured product - component set
- SAP 电商云 Spartacus UI set delivery mode HTTP put 请求的触发时机
- new set数组对象去重失败
- 记录mybatis添加表数据时报出的错误:Could not set property ‘id‘ of ‘class com.xxx.Manager with value ‘xx...xx‘
- 数据结构之集合Set
- C++之map/set与undered_map/undered_set区别(一百一十八)
- Py之set操作【转载】
- 解决svn "cannot set LC_CTYPE locale"的问题
- Redis Set集合类型字符串(六)