为什么我用Grunt启动服务命令行不打印信息?
一直都这样,也不打印错误信息。
Gruntfile.js:
module.exports = function(grunt){
grunt.initConfig({
watch:{
jade:{
files:['views/**'],
options:{
livereload:true
}
},
js:{
files:['public/inc/js/**'],
tasks:['uglify:buildmin'],
options:{
livereload:true
}
},
css: {
files: ['public/inc/sass/**'],
tasks: ['sass:compressd']
}
},
nodemon:{
dev:{
script:'store.js',
options:{
nodeArgs:['--debug'],
ignoreFiles:['README.md','node_modules/**','.DS_Store'],
watchedExtensions:['js'],
watchedFolders:['app','config'],
//debug:true,
delayTime:1,
evn:{
PORT:18080
},
callback: function (nodemon) {
nodemon.on('log', function (event) {
console.log(event.colour);
});
},
cwd:__dirname
}
}
},
sass:{
compressd:{
options:{
style:'compressed'
},
files:{
'public/css/main_style.min.css': 'public/inc/sass/main_style.scss',
'public/css/swiper.min.css':'public/inc/sass/_swiper.scss'
}
},
expanded:{
options:{
style:'expanded'
},
files:{
'public/css/main_style.css': 'public/inc/sass/main_style.scss'
}
}
},
uglify:{
options:{
mangle: false,
preserveComments: 'all'
},
buildmin:{
options:{
report: "min"
},
files:{
'public/js/main_script.min.js':['bower_components/jquery/dist/jquery.min.js','bower_components/jquery_lazyload/jquery.lazyload.js','public/inc/js/script.js'],
'public/js/swiper.min.js':'bower_components/Swiper/dist/js/swiper.min.js',
'public/js/jquery.cxselect.min.js':'bower_components/cxSelect/js/jquery.cxselect.min.js',
'public/js/webuploader.min.js':'bower_components/fex-webuploader/dist/webuploader.min.js',
'public/js/wxopen2-1.0.0.min.js':'public/js/wxopen2-1.0.0.js'
}
},
buildexp:{
files:{
'public/js/main_script.js':['bower_components/jquery/dist/jquery.js','bower_components/jquery_lazyload/jquery.lazyload.js','public/inc/js/script.js'],
'public/js/swiper.js':'bower_components/Swiper/dist/js/swiper.js',
'public/js/jquery.cxselect.js':'bower_components/cxSelect/js/jquery.cxselect.js',
'public/js/jquery.cxselect.min.js':'bower_components/cxSelect/js/jquery.cxselect.min.js',
'public/js/webuploader.js':'bower_components/fex-webuploader/dist/webuploader.js'
}
}
},
concurrent:{
tasks:['nodemon','watch','sass:compressd','sass:expanded','uglify:buildmin','uglify:buildexp'],
//tasks:['nodemon','watch'],
options:{
logCuncurrentOutput:true
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-nodemon');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-concurrent');
grunt.option('force',true);
grunt.registerTask('default',['concurrent']);
};
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请问下楼主解决了没有