fix(structure): fix internal naming

This commit is contained in:
Philipp Kunz 2018-09-15 12:43:01 +02:00
parent 7bad738cb1
commit a707dff92d
5 changed files with 7 additions and 52 deletions

18
dist/index.d.ts vendored
View File

@ -1,18 +0,0 @@
/**
* class Tlt allows templates to be used with different sets of data
*/
export declare class Tlt {
template: any;
/**
* constructor of class Tlt
*/
constructor(templateStringArg: string);
/**
* returns template string with data applied
*/
applyData(data: any): string;
/**
* set a new template string
*/
setTemplate(templateStringArg: string): void;
}

27
dist/index.js vendored
View File

@ -1,27 +0,0 @@
"use strict";
const handlebars = require("handlebars");
/**
* class Tlt allows templates to be used with different sets of data
*/
class Tlt {
/**
* constructor of class Tlt
*/
constructor(templateStringArg) {
this.template = handlebars.compile(templateStringArg);
}
/**
* returns template string with data applied
*/
applyData(data) {
return this.template(data);
}
/**
* set a new template string
*/
setTemplate(templateStringArg) {
this.template = handlebars.compile(templateStringArg);
}
}
exports.Tlt = Tlt;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEseUNBQXdDO0FBRXhDOztHQUVHO0FBQ0g7SUFHRTs7T0FFRztJQUNILFlBQVksaUJBQXlCO1FBQ25DLElBQUksQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLE9BQU8sQ0FBQyxpQkFBaUIsQ0FBQyxDQUFBO0lBQ3ZELENBQUM7SUFFRDs7T0FFRztJQUNILFNBQVMsQ0FBQyxJQUFTO1FBQ2pCLE1BQU0sQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxDQUFBO0lBQzVCLENBQUM7SUFFRDs7T0FFRztJQUNILFdBQVcsQ0FBQyxpQkFBeUI7UUFDbkMsSUFBSSxDQUFDLFFBQVEsR0FBRyxVQUFVLENBQUMsT0FBTyxDQUFDLGlCQUFpQixDQUFDLENBQUE7SUFDdkQsQ0FBQztDQUNGO0FBdkJELGtCQXVCQyJ9

2
package-lock.json generated
View File

@ -1,5 +1,5 @@
{
"name": "@pushrocks/tlt",
"name": "@pushrocks/smartmustache",
"version": "2.0.3",
"lockfileVersion": 1,
"requires": true,

View File

@ -1,14 +1,14 @@
import { tap, expect } from '@pushrocks/tapbundle';
import * as tlt from '../dist/index';
import * as tlt from '../ts/index';
let testTlt: tlt.Tlt;
let testMustache: tlt.SmartMustache;
tap.test('should create a valid instance of tlt', async () => {
testTlt = new tlt.Tlt('some awesome {{customString}} that is {{license}} licensed');
expect(testTlt).to.be.instanceOf(tlt.Tlt);
testMustache = new tlt.SmartMustache('some awesome {{customString}} that is {{license}} licensed');
expect(testMustache).to.be.instanceOf(tlt.SmartMustache);
});
tap.test('should output a valid string with some data', async () => {
let appliedString = testTlt.applyData({
let appliedString = testMustache.applyData({
customString: 'horse',
license: 'MIT'
});

View File

@ -3,7 +3,7 @@ import * as handlebars from 'handlebars';
/**
* class Tlt allows templates to be used with different sets of data
*/
export class Tlt {
export class SmartMustache {
template: any;
/**