Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.
/ go-qtc-npm Public archive

Provides the Go quicktemplate compiler (qtc) in a reusable package for nodejs

License

Notifications You must be signed in to change notification settings

knq/go-qtc-npm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

go-qtc is a simple nodejs package that bundles binary versions of qtc. The version of qtc made available in this package supports {% end %} tag syntax, and thus is not the default qtc binary. Binary versions of qtc for Linux and OS X (darwin) are included in this package.

This package is useful when you need to compile qtc templates into Go code and a full go environment may not be available (such as on a build host, or cloud vm, container, etc.). go-qtc is most useful for use with automated Gulp or Grunt builds.

Installation

Install package via npm:

npm install --save go-qtc

Install package via yarn:

yarn add go-qtc

Using

The package exports only one function, that when run executes the included binary (respective to platform), and passes the supplied parameters and paths to the executable.

The parameters are the same as supported by the qtc binary, and the return value is an object (the same as returned by child_process.spawnSync).

For example:

#!/usr/bin/env node

var qtc = require('go-qtc');

qtc({
  "dir": "/path/to/dir",
  "ext": "html",
  "file": "/path/to/file", // if set, dir and ext are ignored by qtc
});

About

Provides the Go quicktemplate compiler (qtc) in a reusable package for nodejs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published