Skip to content

taipan-pr/mvc5-grunt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mvc5-grunt

This project is a sample project for web application development with ASP.NET MVC5. It consists of the following:

  • ASP.NET MVC5
  • OWIN
  • Grunt

Prerequisite

How to run

  1. Fork or clone this repository

  2. Open a powershell window and make sure you are in the Sample folder of the project

  3. Type in the following command:

    npm install

    image

    This command will restore all the required packages for this project.

  4. Open project with Visual Studio

  5. Build & Run

    image

How to edit

  1. Open Task Runner Explorer window in Visual Studio

    Tip: If you cannot find it type in Task Runner Explorer into the Quick Launch on the upper right corner

    image

  2. You should see the task runner explorer open up

    image

  3. Double click on watch:scripts

    image

    What's happening??

    Basically, watch is a grunt task that keeps looking out for file changes so whenever you make change to any of the typescript (*.ts) files it will compile those files for you.

  4. Navigate to \Scripts\ng-controllers\home\index-controllers.ts and make any change you should see it compile

    image

  5. That's it!!

    image

What Grunt does when it detect changes

  1. Delete all of the js files and js.map files in Scripts folder

  2. Compile all typescript files, which will result in *.js in separate folders

  3. Uglify and bundle all *.js files into one file called bundle.js

Note bundle.js file is not included in the project

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published