# dot-compiler

> Precompile doT.js templates.

Latest version **0.0.3** (published 2013-12-14) · 0 weekly downloads

## Install

```sh
npm install dot-compiler
pnpm add dot-compiler
yarn add dot-compiler
bun add dot-compiler
```

Provides the command `dot-compiler`.

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2013-12-14 |
| First published | 2013-12-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kent Liau |
| Maintainers | kentliau |
| Keywords | templates, dot.js, webmake |

## Links

- npm: https://www.npmjs.com/package/dot-compiler
- Repository: https://github.com/kentliau/dot-compiler
- Issues: https://github.com/kentliau/dot-compiler/issues
- npm.io page: https://npm.io/package/dot-compiler

## Dependencies (2)

- [dot](https://npm.io/package/dot.md) >= 0.2.4
- [commander](https://npm.io/package/commander.md) 0.5.2

## Recent versions

- 0.0.3 (latest) — 2013-12-14
- 0.0.2 — 2013-12-14
- 0.0.1 — 2013-12-14

## README

#dot-compiler

Forked from [slawekkolodziej/dot-module](https://github.com/slawekkolodziej/dot-module). 

dot-compiler help you transform your templates directory into one JST object containing all yours template(*.jst) files. 



### Installation:

```	
npm install -g dot-compiler
```

###Usage:  

```
dot-module [-d <dir>] [-o <output>] [-g <global>]
```



###Options:


```
-d <source-dir> : source directory, default to current directory

-o <output>     : output filename, default is "templates.js"

-g <global>     : variable to hold the templates, default is "window.JST"
```

###Example:
	
Create a [doT.js](http://olado.github.io/doT/index.html) template (templates/sample.jst).  Templates must have a .jst extension.

```
	<ul id="scores">
		{{~it.scores:score:index}}
			<li>{{=score}}</li>
		{{~}}
	</ul>
```

```
$ dot-compiler -d templates/
```
	
Once you include the templates.js module to your code, you can access the template like this:

```
JST.sample('999');
```

---
_Source: https://npm.io/package/dot-compiler · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
