File tree 2 files changed +24
-1
lines changed 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,28 @@ function fromStringRenderer(name) {
169
169
} ;
170
170
}
171
171
172
+ /**
173
+ * velocity support.
174
+ */
175
+
176
+ exports . velocityjs = fromStringRenderer ( 'velocityjs' ) ;
177
+
178
+ /**
179
+ * velocity string support.
180
+ */
181
+
182
+ exports . velocityjs . render = function ( str , options , fn ) {
183
+ return promisify ( fn , function ( fn ) {
184
+ var engine = requires . velocityjs || ( requires . velocityjs = require ( 'velocityjs' ) ) ;
185
+ try {
186
+ options . locals = options ;
187
+ fn ( null , engine . render ( str , options ) . trimLeft ( ) ) ;
188
+ } catch ( err ) {
189
+ fn ( err ) ;
190
+ }
191
+ } ) ;
192
+ } ;
193
+
172
194
/**
173
195
* Liquid support.
174
196
*/
Original file line number Diff line number Diff line change 49
49
"underscore" : " ^1.3.3" ,
50
50
"vash" : " ^0.8.7" ,
51
51
"walrus" : " ^0.10.1" ,
52
- "whiskers" : " ^0.3.3"
52
+ "whiskers" : " ^0.3.3" ,
53
+ "velocityjs" : " ^0.8.2"
53
54
},
54
55
"main" : " index" ,
55
56
"repository" : {
You can’t perform that action at this time.
0 commit comments