Asp.net core ASP.NETVNEXT结构及开发流程
我最近下载了VS15 CTP-6,以了解如何开发下一代VS项目,但我很难弄清楚代码和wwwroot分离后应该遵循的开发流程 我的理解是(角度项目):Asp.net core ASP.NETVNEXT结构及开发流程,asp.net-core,visual-studio-2015,Asp.net Core,Visual Studio 2015,我最近下载了VS15 CTP-6,以了解如何开发下一代VS项目,但我很难弄清楚代码和wwwroot分离后应该遵循的开发流程 我的理解是(角度项目): 开发视图、css和js 使用grunt任务丑化css和js并将其复制到wwwroot文件夹 将wwwroot作为本地IIS站点浏览以查看更改 当wwwroot准备好进行生产时,复制其内容 但是,如果我在第3步中发现问题,那么在js和css被缩小的情况下,我如何找到问题的根源呢 当然我错了,那么我是否应该创建另一个wwwroot副本进行开发,而不进行
当然我错了,那么我是否应该创建另一个wwwroot副本进行开发,而不进行缩小?当您准备投入生产时,您应该使用grunt任务对代码进行放大/缩小
当您在dev中时,使用其他grunt任务复制您的代码
或者,您可以将“丑”与2个目标一起使用:1个用于丑,1个用于美化:
module.exports = function (grunt) {
grunt.initConfig({
bower: {
install: {
options: {
targetDir: "wwwroot/lib",
layout: "byComponent",
cleanTargetDir: false
}
}
},
uglify: {
ugli_target: {
files: {
"wwwroot/scripts/chat.js": ["Scripts/chat.js"]
}
},
beauty_target: {
options: {
beautify: {
beautify: true
},
mangle: false,
sourceMap: true
},
files: {
"wwwroot/scripts/chat.js": ["Scripts/chat.js"]
}
}
}
});
// This command registers the default task which will install bower packages into wwwroot/lib
grunt.registerTask("default", ["bower:install"]);
// The following line loads the grunt plugins.
// This line needs to be at the end of this this file.
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-bower-task");
};