https://github.com/pirxpilot/gettext-pug
prepare Jade/Pug sources for xgettext
https://github.com/pirxpilot/gettext-pug
Last synced: 10 months ago
JSON representation
prepare Jade/Pug sources for xgettext
- Host: GitHub
- URL: https://github.com/pirxpilot/gettext-pug
- Owner: pirxpilot
- Created: 2017-02-12T19:20:49.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2025-07-07T17:40:11.000Z (about 1 year ago)
- Last Synced: 2025-09-17T07:20:20.375Z (10 months ago)
- Language: JavaScript
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]
# gettext-pug
Helper for applying [xgettext] to jade/pug files
It transforms Jade/Pug templates into simplified JAvaScript that can be parsed by xgettext.
## Install
```sh
$ npm install --save gettext-pug
```
## Usage
Programmatically:
```js
var gettextPug = require('gettext-pug');
var javascript = gettextPug(jadeOrPugTemplate);
```
Command line - to prep and process a directory of .jade/.pug templates:
```sh
$ gettext-pug [from-directory] [to-directory]
$ xgettext [files-in-to-directory]
```
## License
MIT © [Damian Krzeminski](https://pirxpilot.me)
[xgettext]: https://www.gnu.org/software/gettext/manual/html_node/xgettext-Invocation.html#xgettext-Invocation
[npm-image]: https://img.shields.io/npm/v/gettext-pug
[npm-url]: https://npmjs.org/package/gettext-pug
[build-url]: https://github.com/pirxpilot/gettext-pug/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/gettext-pug/check.yaml?branch=main
[deps-image]: https://img.shields.io/librariesio/release/npm/gettext-pug
[deps-url]: https://libraries.io/npm/gettext-pug