Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

Latest commit

 

History

History
41 lines (30 loc) · 1.17 KB

README.md

File metadata and controls

41 lines (30 loc) · 1.17 KB

About

go-xgettext is a simple nodejs package that bundles binary versions of go-xgettext. Currently version 3.1.0 (rev: bfe36d3) go-xgettext binaries for Linux, OS X, and Windows are included in this package.

This package is useful when you need to build binary go assets and a full go environment may not be available (such as on a build host, or cloud vm, etc.). As such, it can be used as a self-contained go-xgettext packager for use on automated Gulp or Grunt builds.

Installation

Install package via npm:

npm install --save go-xgettext

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 go-xgettext binary, and the return value is an object (the same as returned by child_process.spawnSync).

For example:

#!/usr/bin/env node

var goxgettext = require('go-xgettext');

goxgettext({
  "o": "myfile.go",
  "c": "comments"
});