This repository is a template to create precompilers for GherKing.
'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'
});
'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'
});
This package uses debug for logging, use gpc:template
:
DEBUG=gpc:template* gherking ...
For detailed documentation see the TypeDocs documentation.