IVAN SIVAK
  • About
  • Blog
  • CV
  • Contact

ASP.NET Core: MVC6 Gulp Template

9/24/2016

0 Comments

 
As discussed in the previous ASP.NET Core article the purpose of this article is to show you how set up a basic gulp template instead of default .NET Core bundles which I personally don't prefer. In my eyes the gulp is far more powerful and simply becomes a must if you deal with larger JavaScript project.
The whole empty template can be downloaded from my GitHub page: ​https://github.com/IvanSivak/ASP.NET-Core-MVC6-Gulp-Template.

Gulp

The best way to get familiar with my template is just by opening the project and see the changes. Let me just briefly clarify. 
  • There is no bundleconfig.json.
  • The whole JavaScript application is outside the wwwroot folder within the JsApp folder.
  • The same with CSS files - outside the wwwroot in the Styles folder.
  • Everything related to build process is inside the gulpfile.js
  • Every change to JavaScript or CSS files triggers gulp to rebuild the project (gulp watcher - don't forget to run it).

    
  • Everything is set up to reflect the current environment. Gulp does not minify or bundle if you're in development environment. 
  • _Layout.cshtml contains all the logic related to which environment files should be downloaded (using the new <environment> tag helper). For both the JavaScript and CSS.

    
  • Everything is simple and clean. Nicely just on one place in _Layout.cshtml and gulpfile.js.
Let me know if you have any issues with my template or recommendations. Unfortunately I was unable to export the project into a template (issue has been discussed on stack overflow) but since the project is very simple and clean you should be able to just download and rename the project or use it as a reference to set up your own new project.
0 Comments



Leave a Reply.

    About

    Blog about my programming experiments, tests and so on.

    View my profile on LinkedIn

    Categories

    All
    Algorithms
    Angular 2
    ASP.NET
    ASP.NET Core
    Aurelia JS
    Cryptography
    Data Structures
    Gulp
    JavaScript
    Math
    MVC6
    .NET Core
    React JS
    Security
    SQL Server

    Archives

    November 2016
    October 2016
    September 2016
    May 2016
    March 2016
    February 2016
    January 2016
    December 2015
    October 2015

    RSS Feed

Ivan Sivak


Stack overflow

Stack overflow profile

LinkedIn

LinkedIn profile

Email

ivansivak@outlook.com

GitHub

GitHub repository
  • About
  • Blog
  • CV
  • Contact