Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gherking/gpc-template
Template for a GherKing precompiler
https://github.com/gherking/gpc-template
cucumber feature-file gherkin gherking gpc hacktoberfest precompiler template typescript
Last synced: 18 days ago
JSON representation
Template for a GherKing precompiler
- Host: GitHub
- URL: https://github.com/gherking/gpc-template
- Owner: gherking
- License: mit
- Created: 2018-05-10T15:28:18.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-11-19T04:32:23.000Z (about 1 month ago)
- Last Synced: 2024-11-19T05:29:15.757Z (about 1 month ago)
- Topics: cucumber, feature-file, gherkin, gherking, gpc, hacktoberfest, precompiler, template, typescript
- Language: TypeScript
- Homepage:
- Size: 953 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gpc-template
![Downloads](https://img.shields.io/npm/dw/gpc-template?style=flat-square) ![Version@npm](https://img.shields.io/npm/v/gpc-template?label=version%40npm&style=flat-square) ![Version@git](https://img.shields.io/github/package-json/v/gherking/gpc-template/master?label=version%40git&style=flat-square) ![CI](https://img.shields.io/github/actions/workflow/status/gherking/gpc-template/ci.yml?branch=main&label=ci&style=flat-square) ![Docs](https://img.shields.io/github/actions/workflow/status/gherking/gpc-template/docs.yml?branch=main&label=docs&style=flat-square)
This repository is a template to create precompilers for GherKing.
## Usage
```javascript
'use strict';
const compiler = require('gherking');
const { default: Template } = require('gpc-template');let ast = await compiler.load('./features/src/login.feature');
ast = compiler.process(
ast,
new Template({
// config
})
);
await compiler.save('./features/dist/login.feature', ast, {
lineBreak: '\r\n'
});
``````typescript
'use strict';
import {load, process, save} from "gherking";
import Template from "gpc-template";let ast = await load("./features/src/login.feature");
ast = process(
ast,
new Template({
// config
})
);
await save('./features/dist/login.feature', ast, {
lineBreak: '\r\n'
});
```## Other
This package uses [debug](https://www.npmjs.com/package/debug) for logging, use `gpc:template` :
```shell
DEBUG=gpc:template* gherking ...
```For detailed documentation see the [TypeDocs documentation](https://gherking.github.io/gpc-template/).