1
|
|
|
import Handlebars from 'handlebars' |
2
|
|
|
import HandlebarsIntl from 'handlebars-intl' |
3
|
|
|
import handlebarsHelperSlugify from 'handlebars-helper-slugify' |
4
|
|
|
|
5
|
|
|
import hooks from '../../extend/abe-hooks' |
6
|
|
|
|
7
|
|
|
/* Handlebar utilities */ |
8
|
|
|
import attrAbe from './handlebars/attrAbe' |
9
|
|
|
import className from './handlebars/className' |
10
|
|
|
import cleanTab from './handlebars/cleanTab' |
11
|
|
|
import ifCond from './handlebars/ifCond' |
12
|
|
|
import ifIn from './handlebars/ifIn' |
13
|
|
|
import isTrue from './handlebars/isTrue' |
14
|
|
|
import math from './handlebars/math' |
15
|
|
|
import moduloIf from './handlebars/moduloIf' |
16
|
|
|
import notEmpty from './handlebars/notEmpty' |
17
|
|
|
import printJson from './handlebars/printJson' |
18
|
|
|
import translate from './handlebars/translate' |
19
|
|
|
import times from './handlebars/times' |
20
|
|
|
import truncate from './handlebars/truncate' |
21
|
|
|
|
22
|
|
|
/* Register utilities */ |
23
|
|
|
Handlebars.registerHelper('attrAbe', attrAbe) |
24
|
|
|
Handlebars.registerHelper('className', className) |
25
|
|
|
Handlebars.registerHelper('cleanTab', cleanTab) |
26
|
|
|
Handlebars.registerHelper('slugify', handlebarsHelperSlugify({Handlebars: Handlebars}).slugify) |
27
|
|
|
Handlebars.registerHelper('ifCond', ifCond) |
28
|
|
|
Handlebars.registerHelper('ifIn', ifIn) |
29
|
|
|
Handlebars.registerHelper('isTrue', isTrue) |
30
|
|
|
Handlebars.registerHelper('math', math) |
31
|
|
|
Handlebars.registerHelper('moduloIf', moduloIf) |
32
|
|
|
Handlebars.registerHelper('notEmpty', notEmpty) |
33
|
|
|
Handlebars.registerHelper('printJson', printJson) |
34
|
|
|
Handlebars.registerHelper('i18nAbe', translate) |
35
|
|
|
Handlebars.registerHelper('times', times) |
36
|
|
|
Handlebars.registerHelper('truncate', truncate) |
37
|
|
|
|
38
|
|
|
HandlebarsIntl.registerWith(Handlebars) |
39
|
|
|
|
40
|
|
|
export { |
41
|
|
|
attrAbe, |
42
|
|
|
className, |
43
|
|
|
cleanTab, |
44
|
|
|
ifCond, |
45
|
|
|
ifIn, |
46
|
|
|
isTrue, |
47
|
|
|
truncate, |
48
|
|
|
math, |
49
|
|
|
moduloIf, |
50
|
|
|
notEmpty, |
51
|
|
|
printJson, |
52
|
|
|
translate, |
53
|
|
|
times, |
54
|
|
|
truncate |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
|