-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
請告訴我我做錯了什麼?