PluginProbe
Force Refresh / 2.1.0
Force Refresh v2.1.0
3.2.1 3.2.0 3.1.2 3.1.1 3.1.0 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.2.0 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.11.0 2.11.1 2.12.0 All 54 releases
force-refresh / node_modules / handlebars / lib / index.js

index.js in Force Refresh 2.1.0, at node_modules/handlebars/lib/index.js

26 lines 792 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // USAGE:
2 // var handlebars = require('handlebars');
3 /* eslint-disable no-var */
4
5 // var local = handlebars.create();
6
7 var handlebars = require('../dist/cjs/handlebars')['default'];
8
9 var printer = require('../dist/cjs/handlebars/compiler/printer');
10 handlebars.PrintVisitor = printer.PrintVisitor;
11 handlebars.print = printer.print;
12
13 module.exports = handlebars;
14
15 // Publish a Node.js require() handler for .handlebars and .hbs files
16 function extension(module, filename) {
17 var fs = require('fs');
18 var templateString = fs.readFileSync(filename, 'utf8');
19 module.exports = handlebars.compile(templateString);
20 }
21 /* istanbul ignore else */
22 if (typeof require !== 'undefined' && require.extensions) {
23 require.extensions['.handlebars'] = extension;
24 require.extensions['.hbs'] = extension;
25 }
26