Skip to content

Instantly share code, notes, and snippets.

@khalidabuhakmeh
Last active February 14, 2017 19:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khalidabuhakmeh/ef98df46dd5f998f02ba193d4a915e9b to your computer and use it in GitHub Desktop.
Save khalidabuhakmeh/ef98df46dd5f998f02ba193d4a915e9b to your computer and use it in GitHub Desktop.

There are designers on our team that primarily work on their MacBook Pros. They do their CSS, Js, and HTML work without ever opening Visual Studio. It would be nice if they could at least adopt Razor when developing the views and components. I want to build a utility that can render a snippet / partial view / view without the need to run the application.

> razor-render .

This command would do the following.

  1. Figure out a layout if applicable
  2. Determine the model of all the views and "stub" it
  3. Render the html to a directory
  4. Launch a browser with an index page that lists all the views pre-rendered

This would allow designers to visually test their templates / html without having to run the application. It also means developers spend less time converting HTML to Razor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment