# gulp-define-golang-template

> Gulp extension to define a golang templates to files in the pipeline.

Latest version **0.1.1** (published 2016-08-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-define-golang-template
pnpm add gulp-define-golang-template
yarn add gulp-define-golang-template
bun add gulp-define-golang-template
```

## 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 | 2016-08-14 |
| First published | 2016-08-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Koji Ishimoto |
| Maintainers | t32k |
| Keywords | gulpplugin |

## Links

- npm: https://www.npmjs.com/package/gulp-define-golang-template
- Repository: https://github.com/t32k/gulp-define-golang-template
- Homepage: https://github.com/t32k/gulp-define-golang-template#readme
- Issues: https://github.com/t32k/gulp-define-golang-template/issues
- npm.io page: https://npm.io/package/gulp-define-golang-template

## Dependencies (3)

- [through2](https://npm.io/package/through2.md) ^2.0.1
- [gulp-util](https://npm.io/package/gulp-util.md) *
- [concat-with-sourcemaps](https://npm.io/package/concat-with-sourcemaps.md) ^1.0.4

## Recent versions

- 0.1.1 (latest) — 2016-08-14
- 0.1.0 — 2016-08-14

## README

# gulp-define-golang-template [![Build Status](https://travis-ci.org/t32k/gulp-define-golang-template.svg?branch=master)](https://travis-ci.org/t32k/gulp-define-golang-template)

gulp-define-golang-template is a Gulp extension to define a [golang template](https://golang.org/pkg/text/template/) to files in the pipeline.


## Install

```shell
npm install --save-dev gulp-define-golang-template
```


## Usage

**gulpfile.js**

```js
var defineTpl = require('gulp-define-golang-template');

gulp.src('./js/foo.js')
  .pipe(defineTpl())
  .pipe(gulp.dest('./dist/'))

gulp.src('./css/bar.css')
  .pipe(defineTpl())
  .pipe(gulp.dest('./dist/'))
```

**./dist/foo.js**

```golang
{{define "foo.js"}}
(function () {
    alert('Hello world!')
}());
{{end}}
```

**./dist/bar.css**

```golang
{{define "bar.css"}}
body {
    font-size: 16px;
}
{{end}}
```

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