gulp plugin to minify ASP.NET Razor View (.cshtml) files and optionally replace hash strings with datetime. Version 0.0.3 is the latest and appears to be a stable release with minimal updates. Key differentiators: focuses on cshtml-specific comments (Razor @* *@, HTML, JS) and whitespace removal, plus a unique hash-to-datetime replacement feature. Alternative to generic HTML minifiers that may break Razor syntax.
npm install gulp-cshtml-minifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic Gulp task that minifies a cshtml file by removing comments and whitespace, using default options.
Test thoroughly; consider using an HTML minifier with cshtml support instead.
Use additional minification steps if needed.
Use pattern /hash/ig for case-insensitive replacement.
Create a custom .d.ts file or use @ts-ignore.
Run 'npm install gulp-cshtml-minifier --save-dev' and check node_modules.
Use 'const minifyCshtml = require('gulp-cshtml-minifier');' without destructuring.Add 'const gulp = require('gulp');' at top and ensure gulp is installed.