gpt4 book ai didi

gruntjs - Grunt 没有找到目标问题

转载 作者:行者123 更新时间:2023-12-05 01:07:32 26 4
gpt4 key购买 nike

我写了以下文件 grunt.js

var _path = require('path');

module.exports = function (grunt) {
var config = {
};


function addProject(project) {
grunt.helper('addProject', config, project);
}

addProject({
name:'mytest',
type:'module',
sourcePath:'../source',
outputPath:'../test/',
version : grunt.option('ver')||'0.1.0.0'
});

grunt.registerTask('default', 'module closureCompiler');
grunt.initConfig(config);
};

当我在我的 bat 文件模块closureCompiler 同步中使用命令运行它时,它给出了一个错误提示
Running "sync" task
>> No "sync" targets found.
<WARN> Task "sync" failed. Use --force

这是什么意思?

最佳答案

正如错误消息指出的那样,您需要为 sync 定义一个目标。任务:

grunt.initConfig({
sync: {
target: {} // <= needs to be defined
}
});

关于gruntjs - Grunt 没有找到目标问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18418621/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com