https://github.com/windwp/razortransformtool
Init Project
https://github.com/windwp/razortransformtool
Last synced: about 2 months ago
JSON representation
Init Project
- Host: GitHub
- URL: https://github.com/windwp/razortransformtool
- Owner: windwp
- Created: 2015-11-15T05:40:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-19T23:53:53.000Z (almost 10 years ago)
- Last Synced: 2025-12-13T09:52:39.655Z (6 months ago)
- Language: C#
- Size: 2.11 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
RazorTransformTool
------
This project use razor syntax for transform text like T4
Project support include external dll for compiler
Sample
------


Using CustomTool for visual studio
-------
Install RazorTransformTool extensions
[Install](https://visualstudiogallery.msdn.microsoft.com/68d81c9e-3e07-47bd-a0ec-27ab4a80ef02)
Restart visual studio
Choose a template file(.cshtml) then open Properties Panel and set custom tool to RazorTransformTool

Using Console Application
-------
Start project RazorTransformConsole
type command razor template\test.cshtml for transform code
HeaderConfig
------
InputDllFolder : Folder contain dll for compiler code
OutputFile: file path for save file using in console application. When using in custom tool It will only set extension in generate code
ListIncludeFile: list of file will be include in top of template file before compiler
IsHeader=1 : auto generate header in result file
Example header
---
/*config
OutPutFile=Out\data.html
InputDllFolder=lib
ListIncludeFile=_include.cshtml,_include2.cshtml
*/
---
Some Helper Function in razor Syntax
------
---
@Partial("Partial.cshtml",model)// render partial with model
@R("Data");// print raw data
@R2();// write @ for generate code cshtml
@WF(2,content,data)// write string format with 2 \t characters in start of line
---
---
Project use [RazorEngine](https://github.com/Antaris/RazorEngine) and [Tharga Console](https://github.com/poxet/tharga-console)