当我运行命令grunt
或任何相关的grunt
命令时。
我不断收到此错误消息。
jit-grunt:未找到“默认”任务的插件。 如果您已经安装了插件,请设置静态映射。 参见https://github.com/shootaroo/jit-grunt#static-mappings
警告:任务“默认”失败。使用--force继续。
由于警告而中止。
这是我的咕unt声文件
/*! Copyright Disney. All rights reserved. */
'use strict';
// Gruntfile.js for Angular projects
var gruntTasks = require('wdpr-grunt-tasks');
var _ = require('lodash');
var writer = require('./config/lib/writer.js');
var diff = require('object-diff');
module.exports = function(grunt) {
require('jit-grunt')(grunt);
require('time-grunt')(grunt);
// Configure Tasks
var taskCfg = gruntTasks.loadTaskSet('client-block', grunt);
writer.json(taskCfg, 'taskCfg.json');
_.merge(taskCfg, {
clean: {
build: {
src: [
'demo/dist',
'dist',
'docs'
]
}
},
copy: {
gitHooks: {
expand: false,
cwd: '.',
src: 'hooks/**/*',
dest: '.git/',
options:{
mode: true
}
},
githubDemoDeps: {
expand: true,
cwd: 'bower_components/',
src: [
'**/dist/*.min.js',
'*.min.js',
// '**/*.css'
],
dest: 'docs/',
flatten: true
},
githubDemoSrc: {
expand: true,
cwd: 'src/wdpr-quickquote/',
src: [
'**/*.min.js'
],
dest: 'docs/',
flatten: true
},
githubDemo: {
expand: true,
src: [
// 'bower_components/**/*.min.js',
// 'src/wdpr-quickquote/**/*.js',
'demo/src/client/wdpr-quickquote/**/*.{json,html}',
],
dest: 'docs/',
}
}
});
// Local Task Config
var localGruntConfigs = require('load-grunt-config')(grunt, {
config: require('./config/project'),
init: false
}),
newTaskCfg = _.extend({},
taskCfg,`enter code here`
localGruntConfigs
);
writer.json(taskCfg, 'extended_taskCfg.json');
writer.json(diff(taskCfg, newTaskCfg), 'taskCfg_diffs.json');
grunt.initConfig(newTaskCfg);
// Register Extra Tasks (optional)
grunt.registerTask('synchronous-default', ['copy:gitHooks', 'analyze', 'test', 'protractor:all']);
grunt.registerTask('default', ['copy:gitHooks', 'concurrent:default']);
grunt.registerTask('develop', ['default', 'watch:default']);
grunt.registerTask('develop-linters', ['analyze', 'watch:linters']);
grunt.registerTask('develop-units', ['test', 'watch:karma']);
grunt.registerTask('develop-functionals', ['protractor:all', 'watch:protractorAll']);
grunt.registerTask('develop-wdw-functionals', ['protractor:wdw', 'watch:protractorWDW']);
grunt.registerTask('develop-dlr-functionals', ['protractor:dlr', 'watch:protractorDLR']);
grunt.registerTask('develop-dlp-functionals', ['protractor:dlp', 'watch:protractorDLP']);
grunt.registerTask('develop-shdr-functionals', ['protractor:shdr', 'watch:protractorSHDR']);
grunt.registerTask('develop-hkdl-functionals', ['protractor:hkdl', 'watch:protractorHKDL']);
grunt.registerTask('develop-less', ['less:dev', 'watch:srcLess']);
grunt.registerTask('develop-prod', [
'build-prod',
'shell:kickHomepage',
'watch:build'
]);
grunt.task.registerTask('joma', 'Debug Task.', function() {
grunt.log.writeln('Block Joma Task');
if (arguments.length === 0) {
grunt.log.writeln(this.name + ', no args');
} else {
grunt.log.writeln(this.name + ', ' + JSON.stringify(arguments));
}
});
grunt.registerTask('githubDemoBuild', [
// 'build-dev',
'copy:githubDemoDeps',
'copy:githubDemoSrc',
'copy:githubDemo',
'processhtml:githubDemo'
]);
grunt.registerTask('githubDemo', [
'shell:githubDemoBuildPre',
'shell:githubDemoBuildClean',
'githubDemoBuild',
'shell:githubDemoBuildCommit',
'shell:githubDemoBuildPost'
]);
};
请咨询, 谢谢