Skip to content

Commit 0a6b1e6

Browse files
njhUsainBloot
authored andcommitted
Switched from hogan.js to handlebars (#69)
There have been no commits to hogan.js for ~4 years
1 parent 32e6b46 commit 0a6b1e6

File tree

6 files changed

+691
-1034
lines changed

6 files changed

+691
-1034
lines changed

lib/service.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
'use strict';
22

3-
const hogan = require('hogan.js');
3+
const handlebars = require('handlebars');
44
const fs = require('fs');
55
const path = require('path');
66
const getServiceProperties = require('./serviceProperties');
77

8-
const templateFile = fs.readFileSync(path.resolve(__dirname, '../templates/service.mustache'), 'utf-8');
9-
const template = hogan.compile(templateFile);
8+
const templateFile = fs.readFileSync(path.resolve(__dirname, '../templates/service.hbs'), 'utf-8');
9+
const template = handlebars.compile(templateFile);
1010

1111
module.exports = function (pkg) {
1212
const serviceProperties = getServiceProperties(pkg);
1313

14-
return template.render(serviceProperties);
14+
return template(serviceProperties);
1515
};

lib/spec.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
'use strict';
22

3-
const hogan = require('hogan.js');
3+
const handlebars = require('handlebars');
44
const fs = require('fs');
55
const path = require('path');
66
const getServiceProperties = require('./serviceProperties');
77

8-
const templateFile = fs.readFileSync(path.resolve(__dirname, '../templates/spec.mustache'), 'utf-8');
9-
const template = hogan.compile(templateFile);
8+
const templateFile = fs.readFileSync(path.resolve(__dirname, '../templates/spec.hbs'), 'utf-8');
9+
const template = handlebars.compile(templateFile);
1010

1111
const defaultRelease = 1;
1212

@@ -61,5 +61,5 @@ module.exports = function (pkg, release) {
6161
getServiceProperties(pkg)
6262
);
6363

64-
return template.render(serviceProperties);
64+
return template(serviceProperties);
6565
};

0 commit comments

Comments
 (0)