npm install gulp-preview-cshtml> Allows frontend developers working on MacOS to work on their projects using original cshtml files. Helpful with Umbraco frontend development. (https://github.com/maciejkorsan/gulp-preview-cshtml)
```
$ npm install --D gulp-preview-cshtml
`js
const gulp = require('gulp');
const previewcshtml = require('gulp-preview-cshtml');
const projectName = 'myProject';
gulp.task('html', function() {
return gulp.src([${projectSource}/Views/.cshtml, !${projectSource}/Views/Layout.cshtml, !${projectSource}/Views/.ref.cshtml])${projectSource}/Views/Layout.cshtml
.pipe(previewCshtml(, projectSource))`
.pipe(rename({
extname: ".html"
}))
.pipe(gulp.dest('./dist/'));
});
All you have to do is create a .ref.cshtml file near regular partial .cshtml. So if you import navigation like
``
@Html.Partial("/Views/Partials/_MainNavigation.cshtml")/Views/Partials/_MainNavigation.ref.cshtml`
you don't have to
change your _Layout/_Whatever.cshtml file. Just copy static html to
#0.2.0
- added support for @Html.Partial imports.
MIT © [Maciej Korsan]