gulp-cshtml-minifier
Minify ASP.NET Razor Views (.cshtml files) & REPLACE HASH to Datetime string
Usage
First, install gulp-cshtml-minifier
as a development dependency:
npm install --save-dev gulp-cshtml-minifier
Then, add it to your gulpfile.js
:
Simple
var minifyCshtml = ; gulp;
Advanced
var minifyCshtml = ;var rename = ; // install gulp-renamevar header = ; // install gulp-header gulp;
API
gulp-cshtml-minifier can be called with an optional 'options' object.
minifyCshtml(options)
options
Type: Object
options.htmlComments
Type: boolean
Default: false
Remove HTML comments <!-- -->
options.jsComments
Type: boolean
Default: false
Remove Javascript comments /* */
options.razorComments
Type: boolean
Default: true
Remove Razor comments @* *@
options.whitespace
Type: boolean
Default: true
Remove white-space between angle brackets > <