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: about 1 month 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 (about 8 years ago)
- Default Branch: main
- Last Pushed: 2024-11-19T04:32:23.000Z (over 1 year ago)
- Last Synced: 2025-04-03T09:46:29.273Z (about 1 year ago)
- Topics: cucumber, feature-file, gherkin, gherking, gpc, hacktoberfest, precompiler, template, typescript
- Language: TypeScript
- Homepage:
- Size: 953 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gpc-template
    
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/).