gulp-define-golang-template

0.1.1 • Public • Published

gulp-define-golang-template Build Status

gulp-define-golang-template is a Gulp extension to define a golang template to files in the pipeline.

Install

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

Usage

gulpfile.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

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

./dist/bar.css

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

Readme

Keywords

Package Sidebar

Install

npm i gulp-define-golang-template

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • t32k