1.2.1 • Published 2 years ago

torx v1.2.1

Weekly downloads
12
License
MIT
Repository
github
Last release
2 years ago

Torx

Torx is the TypeScript template engine for Node.

Installation

Torx is designed to run from the command line, as an Express template engine, or as a Node package.

npm install -g torx

Syntax

Execute and render TypeScript variables using the @ symbol.

<button>@label</button>

Escape @ by using it twice, @@.

<p>@@username</p>

This example creates a square with 5 stripes.

@{
   const imageSize = 200;
   const stripeHeight = 20;
}
<svg width="@imageSize" height="@imageSize" xmlns="http://www.w3.org/2000/svg">
   @for (let index = 0; index < 5; index++) {
      <rect x="0" y="@(index * stripeHeight * 2)" width="@imageSize" height="@stripeHeight" />
   }
</svg>

Usage

torx file.torx out/file.html
1.2.0

2 years ago

1.2.1

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago