2
我有任務運行探索,我在我的解決方案中安裝了grunt。我在package.json中遇到了一些錯誤,但我不明白,因爲我用它來創建npm init。grunt:我在package.json中有一些錯誤
錯誤是:
序列不包含任何元素:
Failed to run "C:\_DEVELOP\C#\my_circle\my_circle\package.json"...
Sequence contains no elements
Failed to run "C:\_DEVELOP\C#\my_circle\my_circle\Gruntfile.js"...
cmd.exe /c grunt -b "C:\_DEVELOP\C#\my_circle\my_circle" --gruntfile "C:\_DEVELOP\C#\my_circle\my_circle\Gruntfile.js" --tasks "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\TaskRunnerExplorer\Scripts" vs-grunt-task-reader
Failed to run "C:\_DEVELOP\C#\my_circle\my_circle\package.json"...
Sequence contains no elements
這是當我在組合改變TO0使用GruntFile.js。
in node_modules我已經安裝:grunt-cli, grunt-contrib-jshint, grunt-contrib-uglify, grunt-contrib-watch
,它們在node_modules
裏面的項目級別。
我GruntFile.js是:
/// <binding Clean='uglify, watch' />
module.exports = function (grunt)
{
var bannerContent = '/*********************************************************\n' +
' my_circle ' +
' ==> Fecha subida:' +
' <%= grunt.template.today("dd-mm-yyyy hh:MM") %>\n ' +
'*********************************************************/\n\n';
//definir las tareas
grunt.initConfig({
uglify: {
options: {
spawn: false,
compress: false,
mangle: false,
beautify: true,
banner: bannerContent
},
js: {
src: ["Scripts/*.js"],
dest: "Scripts/output.min.js"
}
}
});
//para cargar los plugins
grunt.loadNpmTasks('grunt-contrib-uglify');
//registrar los plugins a las tareas por defecto. si ejecuto grunt ejecuta por orden los siguientes plugins.
grunt.registerTask('default', ['uglify']);
};
什麼是錯在我的代碼和的package.json?