# gulp-dot-commonjs-compile

> Gulp plugin for precompilation of doT templates.

Latest version **0.0.2** (published 2015-06-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-dot-commonjs-compile
pnpm add gulp-dot-commonjs-compile
yarn add gulp-dot-commonjs-compile
bun add gulp-dot-commonjs-compile
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-06-29 |
| First published | 2015-06-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Lukezhang |
| Maintainers | lukezhang001 |
| Keywords | doT, template, precompilation, gulp, plugin, gulpplugin |

## Links

- npm: https://www.npmjs.com/package/gulp-dot-commonjs-compile
- Repository: https://github.com/lukezhang001/gulp-dot-commonjs-compile
- Issues: https://github.com/lukezhang001/gulp-dot-commonjs-compile/issues
- npm.io page: https://npm.io/package/gulp-dot-commonjs-compile

## Dependencies (4)

- [dot](https://npm.io/package/dot.md) ^1.0.3
- [path](https://npm.io/package/path.md) ^0.11.14
- [through2](https://npm.io/package/through2.md) ^2.0.0
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.6

## Recent versions

- 0.0.2 (latest) — 2015-06-29
- 0.0.1 — 2015-06-29

## README

# gulp-dot-commonjs-compile
Gulp plugin for precompilation of doT templates.
## Example
If we have following folder structure:    
src/list.html:
```js
  <script type="text/template" id="mainTpl"> 
  ...
  </script>
  <script type="text/template" id="detailTpl"> 
  ...
  </script>
```  
Then, running this code:
```js
gulp.task('templates', function() {
    gulp.src('src/*.html')
    .pipe(dotCompile())
    .pipe(rename(function (path) {
      path.extname = ".js"
     }))
    .pipe(gulp.dest('dest'));
});
```
Will produce dest/list.js:
```js
define("list",function(require,exports,module){
exports.mainTpl =function ...
exports.detailTpl =function ...
...
});
```

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