File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 39
39
- [ react] ( https://github.com/facebook/react )
40
40
- [ slm] ( https://github.com/slm-lang/slm )
41
41
- [ swig (unmaintained)] ( https://github.com/paularmstrong/swig )
42
+ - [ swig (maintained fork)] ( https://github.com/node-swig/swig-templates )
42
43
- [ teacup] ( https://github.com/goodeggs/teacup )
43
44
- [ templayed] ( http://archan937.github.com/templayed.js/ )
44
45
- [ twig] ( https://github.com/justjohn/twig.js )
Original file line number Diff line number Diff line change @@ -540,7 +540,18 @@ exports.swig = fromStringRenderer('swig');
540
540
541
541
exports . swig . render = function ( str , options , fn ) {
542
542
return promisify ( fn , function ( fn ) {
543
- var engine = requires . swig || ( requires . swig = require ( 'swig' ) ) ;
543
+ var engine = requires . swig ;
544
+ if ( ! engine ) {
545
+ try {
546
+ engine = requires . swig = require ( 'swig' ) ;
547
+ } catch ( err ) {
548
+ try {
549
+ engine = requires . swig = require ( 'swig-templates' ) ;
550
+ } catch ( otherError ) {
551
+ throw err ;
552
+ }
553
+ }
554
+ }
544
555
545
556
try {
546
557
if ( options . cache === true ) options . cache = 'memory' ;
Original file line number Diff line number Diff line change 56
56
"react-dom" : " ^15.3.2" ,
57
57
"should" : " *" ,
58
58
"slm" : " ^0.5.0" ,
59
+ "swig-templates" : " ^2.0.2" ,
59
60
"swig" : " ^1.4.1" ,
60
61
"teacup" : " ^2.0.0" ,
61
62
"templayed" : " >=0.2.3" ,
You can’t perform that action at this time.
0 commit comments