gulp 安装
1、gulp是基于node.js流的一个前端自动化构建工具,可以使用它构建自动化工作流程,简化我们的工作亮,让我们把重点放在功能的开发上,提供开发效率和工作质量;
安装
1、npm install gulp -g
2、gulp --version
CLI version: 2.2.0
Local version: 4.0.2
3、验证
创建gulpfile.js
var gulp= require('gulp'); gulp.task('default',function(){ console.log("HTTP Server Started"); }); PS D:\sourcecode\gulp> gulp [21:06:58] Using gulpfile D:\sourcecode\gulp\gulpfile.js [21:06:58] Starting 'default'... [21:06:58] The following tasks did not complete: default [21:06:58] Did you forget to signal async completion?
Did you forget to signal async completion?
var gulp= require('gulp'); gulp.task('default',function(done){ console.log("HTTP Server Started"); done(); }); PS D:\sourcecode\gulp> gulp [21:12:10] Using gulpfile D:\sourcecode\gulp\gulpfile.js [21:12:10] Starting 'default'... HTTP Server Started [21:12:10] Finished 'default' after 3.95 ms