Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 949 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 949 Bytes

A TypeScript compiler for ASP.NET Core

Build status NuGet

This package compiles TypeScript, ES6 and JSX files into ES5 by hooking into the LigerShark.WebOptimizer pipeline.

Usage

You can reference any TypeScript file directly in the browser and a compiled ES5 JavaScript document will be served. To set that up, do this:

services.AddWebOptimizer(pipeline =>
{
    pipeline.CompileTypeScirptFiles();
});

Or if you just want to parse specific TypeScript files, do this:

services.AddWebOptimizer(pipeline =>
{
    pipeline.CompileTypeScriptFiles("/path/file1.ts", "/path/file2.ts");
});