T4 and Razor scaffolding for ASP.NET 5 without Visual Studio
Clone or download
Pull request Compare This branch is 13 commits behind totht91:dev.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
samples
src/Bricelam.TextTemplating
test/Bricelam.TextTemplating.Tests
.gitignore
NuGet.Config
README.md
TextTemplating.sln
global.json

README.md

TextTemplating

T4 for ASP.NET 5

To use, add the following to your project.json.

{
    "dependencies": {
        "Bricelam.TextTemplating": "1.0.0-*"
    },
    "commands": {
        "t4": "Bricelam.TextTemplating"
    }
}

To transform templates at design-time, use the following command.

k t4

By default, all text template files under the project directory will be transformed. You can specify explicit file patterns.

k t4 Changelog.tt **\GeneratedCode\*.tt

To create a runtime text template, use the corresponding command line option.

k t4 --preprocess

To transform templates at runtime, you can also use the Engine class.

var engine = new Engine();
var host = MyCustomEngineHost();
var output = engine.ProcessTemplate(inputTemplate, host);