-1
我是iOS开发人员&当前我正在尝试缩小我的所有html文件。我使用一饮而尽&下面是我gulpfile.js使用GULP缩小HTML文件时出错
var gulp = require('gulp');
var htmlmin = require('gulp-html-minifier');
gulp.task('minify', function() {
gulp.src('./*.html')
.pipe(htmlmin({collapseWhitespace: true}))
.pipe(gulp.dest('./dist'))
});
当我试图运行在终端“吞掉”我收到以下错误
Test2s-MacBook-Pro:TestFile test2$ gulp
[14:43:36] Using gulpfile ~/Desktop/TestFile/gulpfile.js
[14:43:36] **Task 'default' is not in your gulpfile**
[14:43:36] Please check the documentation for proper gulpfile formatting
Test2s-MacBook-Pro:TestFile test2$
任何一个可以推荐我在做什么错误?我也看到这个链接,但没有帮助https://github.com/gulpjs/gulp/issues/1155
请告诉我我做错了什么?