module.exports = function(grunt){
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
copy: {
t1:{
src: 'dir1/*',
dest: 'dir2/'
}
}
});
grunt.loadNpmTasks('grunt-contrib-copy);
grunt.registerTask('default', ["copy"]);
};
第一次尝试grunt复制,找不到问题的任何地方,这里是什么问题,当我运行grunt复制时,它将引发错误。
正在加载“ Gruntfile.js”任务...错误
SyntaxError:无效或意外的令牌
警告:找不到任务“复制”。使用--force继续。*
任何帮助将不胜感激。
对不起,这是语法错误,我的IDE没有显示任何错误指示。
grunt.loadNpmTasks('grunt-contrib-copy');
这已得到纠正。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句