How to use the loaders function from swig
Find comprehensive JavaScript swig.loaders code examples handpicked from public code repositorys.
999 1000 1001 1002 1003 1004 1005 1006 1007 1008
this.context = context; this.engine = new swig.Swig({ cache: this.cache || 'memory', locals: this.context.locals, loader: this.loader || swig.loaders.memory(context.templates, '/') }); Object.keys(filters).forEach(function(name) { self.engine.setFilter(name, filters[name](self));
0
1
0
+ 5 other calls in file
GitHub: waleeakhter/apply-insure
37 38 39 40 41 42 43 44 45 46 47
const auth = jwt({ secret: config.secret, userProperty: "payload", }); swig.setDefaults({ loader: swig.loaders.fs(path.join(__dirname, "../config/templates")), }); // SMTP settings // let transporter = nodemailer.createTransport({
0
0
1
+ 70 other calls in file
33 34 35 36 37 38 39 40 41 42 43
secret: config.secret, userProperty: 'payload' }); swig.setDefaults( { loader: swig.loaders.fs(path.join(__dirname, '../config/templates')) } ); // SMTP settings
0
0
1
+ 69 other calls in file
16 17 18 19 20 21 22 23 24 25 26
var browserSync = require('browser-sync'); var opts = { defaults: { autoescape: true, loader: swig.loaders.fs(process.cwd()), cache: false, varControls: config.swig.varControls || [ "{{", "}}" ], locals: { now: function () {
0
0
0
GitHub: my-drafts/zresponse
83 84 85 86 87 88 89 90 91 92
}, cache: 'memory', */ cache: this._cache, locals: Object.assign({}, LOCALS, this._locals), loader: swig.loaders.fs(this._root, { encoding: this._ecoding }), offset: this._timeZoneOffset });
0
0
2
swig.compileFile is the most popular function in swig (1638 examples)