Javascript Bundling on visual studio 2015

后端 未结 5 1359
Happy的楠姐
Happy的楠姐 2021-02-14 06:01

System.Web.Optimization on Visual Studio 2013 was giving us Bundling on javascript files and the best part of that was allowing us to go with indiv

5条回答
  •  既然无缘
    2021-02-14 06:40

    [Edit] BundlerMinifier Extension can do Bundling and minification as a Visual Studio Extension it has limited capabilities compare to GULP, GRUNT or My favorite WebPack but if you want an easy solution https://github.com/madskristensen/BundlerMinifier is the one

    long story short like ecm_dev said old style optimization bundling will not be available this is the right answer, but it wasn't helping me to solve my bundling and minification problem and last a few months it pushed me to find replacements which were actually there Bower, Gulp, Grunt which Microsoft is pushing us to use

    I picked the Bower as a package manager Bower is the replacement for nuget on client files (css,js,less etc..) and Gulp as a build task op

    gulp-bower Help you to pull Bower packages

    main-bower-files Extract Bower files in right locations

    gulp-concat bundles your css or js files (any file)

    gulp-uglify minify your js files

    gulp-less compile your less files

    gulp-cssmin minify your css files

    gulp-inject inject your css and javascript tags into your .html or .cshtml

    Gulp is actually more capable than System.Web.Optimization + Web Essential combine but has lot to learn this may not the answer you are looking for (when I first asked this question a little longer a month ago it definitely wasn't mine)

    but if you are looking for this question, you have the same problem I had for

    enable gulp on VS 2015 : http://tom.cabanski.com/2014/11/23/using-gulp-with-asp-net-vnext-and-visual-studio-2015-preview/

    gulp 101: http://ilikekillnerds.com/2014/07/how-to-basic-tasks-in-gulp-js/

    I like to watch video: https://www.youtube.com/watch?v=dwSLFai8ovQ

    and here another blog post: http://mmercan.com/blog/?p=271

提交回复
热议问题