# gulp-tpl2mod

> gulp plugin to transform plain text to javascript string

Latest version **0.1.1** (published 2014-05-29) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install gulp-tpl2mod
pnpm add gulp-tpl2mod
yarn add gulp-tpl2mod
bun add gulp-tpl2mod
```

## 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.1.1 |
| Published | 2014-05-29 |
| First published | 2014-02-11 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | spud |
| Maintainers | spud |
| Keywords | gulp, template, string, transform |

## Links

- npm: https://www.npmjs.com/package/gulp-tpl2mod
- Repository: git@github.com:supersheep/gulp-tpl2mod
- Homepage: https://github.com/supersheep/gulp-tpl2mod
- Issues: https://github.com/supersheep/gulp-tpl2mod/issues
- npm.io page: https://npm.io/package/gulp-tpl2mod

## Dependencies (4)

- [merge](https://npm.io/package/merge.md) ~1.1.2
- [tpl2mod](https://npm.io/package/tpl2mod.md) 0.0.1
- [gulp-util](https://npm.io/package/gulp-util.md) ~2.2.14
- [map-stream](https://npm.io/package/map-stream.md) ~0.1.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2014-05-29
- 0.1.0 — 2014-05-29
- 0.0.1 — 2014-02-11

## README

gulp-tpl2mod
============

gulp plugin to transform plain text to javascript string

## Usage
```javascript
var gulp = require('gulp');
var tpl = require('gulp-tpl2mod');
```
Build to CommonJS module
```javascript
  gulp.src(path.join(__dirname, 'templates/*.html'))
      .pipe(tpl({
        prefix: 'module.exports=require("tpl").compile(',
        suffix: ')'
      }))
      .pipe(gulp.dest(path.join(__dirname, 'built_templates/')));
```
Build to AMD module
```javascript
  gulp.src(path.join(__dirname, 'templates/*.html'))
      .pipe(tpl({
        prefix: 'define(["tpl"],function(tpl){return tpl.compile(',
        suffix: ')})'
      }))
      .pipe(gulp.dest(path.join(__dirname, 'built_templates/')));
```
You may adjust `tpl` in prefix string as need.

## Options
Same as [tpl2mod](https://www.npmjs.org/package/tpl2mod).

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