plug-templates
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

plug

straight forward string templates

example usage

app

#!/usr/bin/env node
 
let plugs = require('plug-templates');
 
console.log('plugs-test');
let template = `
export class ~component~Component {
  private ~myProp~;
  }
`
 
let myPlugs = {
  component: 'MyLayout',
  myProp: 'height = 5'
}
 
let pluggedTemplate = plugs.plug(template, myPlugs);
 
console.log(pluggedTemplate);

output:

export class MyLayoutComponent {
  private height = 5;
  }

Readme

Keywords

none

Package Sidebar

Install

npm i plug-templates

Weekly Downloads

0

Version

1.0.3

License

ISC

Last publish

Collaborators

  • gforceg