Skip to content

gherking/gpc-template

Repository files navigation

gpc-template

Downloads Version@npm Version@git CI Docs

This repository is a template to create precompilers for GherKing.

Usage

'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'
});

Other

This package uses debug for logging, use gpc:template :

DEBUG=gpc:template* gherking ...

For detailed documentation see the TypeDocs documentation.