Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net core ASP.NETVNEXT结构及开发流程_Asp.net Core_Visual Studio 2015 - Fatal编程技术网

Asp.net core ASP.NETVNEXT结构及开发流程

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副本进行开发,而不进行

我最近下载了VS15 CTP-6,以了解如何开发下一代VS项目,但我很难弄清楚代码和wwwroot分离后应该遵循的开发流程

我的理解是(角度项目):

  • 开发视图、css和js
  • 使用grunt任务丑化css和js并将其复制到wwwroot文件夹
  • 将wwwroot作为本地IIS站点浏览以查看更改
  • 当wwwroot准备好进行生产时,复制其内容
  • 但是,如果我在第3步中发现问题,那么在js和css被缩小的情况下,我如何找到问题的根源呢


    当然我错了,那么我是否应该创建另一个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");
    };