我正在尝试使用grunt2gulp.js从Grunt迁移到Gulp。在输出gulpfile.js中,我收到一个错误:'请删除" time-grunt"来自Gruntfile.js'。遇到此错误时,我在Gruntfile.js中注释了以下代码
//require('time-grunt')(grunt);
在重现gulpfile.js时,我仍然遇到同样的错误。知道如何解决这个问题吗?
答案 0 :(得分:2)
你真的需要删除该行并再次尝试。 对我而言。
看:
cmacedo-OSX:Simple-Hello-World-Cloud-App camilamacedo$ /usr/local/opt/nvm/versions/node/v4.4.7/bin/grunt2gulp Gruntfile.js
Please remove "time-grunt" from the Gruntfile
cmacedo-OSX:Simple-Hello-World-Cloud-App camilamacedo$ /usr/local/opt/nvm/versions/node/v4.4.7/bin/grunt2gulp Gruntfile.js
var gulp = require('gulp');
var rename = require('gulp-rename');
var concurrent = require('gulp-concurrent');
var jshint = require('gulp-jshint');
var env = require('gulp-env');
var nodeInspector = require('gulp-node-inspector');
var nodemon = require('gulp-nodemon');
var open = require('gulp-open');
var plato = require('gulp-plato');
var shell = require('gulp-shell');
var jshint = require('gulp-jshint');
gulp.task('watch', function () {
gulp.watch('gruntfile.js', [ /* dependencies */ ]);
});
gulp.task('watch', function () {
gulp.watch('application.js', [ /* dependencies */ ]);
});
gulp.task('watch', function () {
gulp.watch('lib/**/*.js', [ /* dependencies */ ]);
});
gulp.task('watch', function () {
gulp.watch('test/**/*.js', [ /* dependencies */ ]);
});
gulp.task('watch', function () {
gulp.watch('public/views/**', [ /* dependencies */ ]);
});
gulp.task('watch', function () {
gulp.watch('app/views/**', [ /* dependencies */ ]);
});
gulp.task('nodemon', function () {
return gulp
.src('[object Object]')
.pipe(gulp.dest('dev'))
;
});
gulp.task('concurrent', function () {
return gulp
.src('nodemon,watch')
.pipe(gulp.dest('serve'))
;
});
gulp.task('concurrent', function () { // WARNING: potential duplicate task
return gulp
.src('node-inspector,shell:debug,open:debug')
.pipe(gulp.dest('debug'))
;
});
gulp.task('env', function () {
return gulp
.src('[object Object]')
.pipe(gulp.dest('local'))
;
});
gulp.task('node-inspector', function () {
return gulp
.src('[object Object]')
.pipe(gulp.dest('dev'))
;
});
gulp.task('shell', function () {
return gulp
.src('[object Object]')
.pipe(gulp.dest('debug'))
;
});
gulp.task('shell', function () { // WARNING: potential duplicate task
return gulp
.src('[object Object]')
.pipe(gulp.dest('unit'))
;
});
gulp.task('shell', function () { // WARNING: potential duplicate task
return gulp
.src('[object Object]')
.pipe(gulp.dest('accept'))
;
});
gulp.task('shell', function () { // WARNING: potential duplicate task
return gulp
.src('[object Object]')
.pipe(gulp.dest('coverage_unit'))
;
});
gulp.task('shell', function () { // WARNING: potential duplicate task
return gulp
.src('[object Object]')
.pipe(gulp.dest('coverage_accept'))
;
});
gulp.task('open', function () {
return gulp
.src('[object Object]')
.pipe(gulp.dest('debug'))
;
});
gulp.task('open', function () { // WARNING: potential duplicate task
return gulp
.src('[object Object]')
.pipe(gulp.dest('platoReport'))
;
});
gulp.task('plato', function () {
return gulp
.src('undefined')
.pipe(gulp.dest(''))
;
});
gulp.task('jshint', function () {
return gulp
.src('*.js,lib/**/*.js,test/**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'))
;
});
gulp.task('test', ["jshint","shell:unit","shell:accept"]);
gulp.task('unit', ["jshint","shell:unit"]);
gulp.task('accept', ["env:local","shell:accept"]);
gulp.task('coverage', ["shell:coverage_unit","shell:coverage_accept"]);
gulp.task('coverage-unit', ["shell:coverage_unit"]);
gulp.task('coverage-accept', ["env:local","shell:coverage_accept"]);
gulp.task('analysis', ["plato:src","open:platoReport"]);
gulp.task('serve', ["env:local","concurrent:serve"]);
gulp.task('debug', ["env:local","concurrent:debug"]);
gulp.task('default', ["serve"]);
cmacedo-OSX:Simple-Hello-World-Cloud-App camilamacedo$