diff options
| author | Shipwreckt <me@shipwreckt.co.uk> | 2025-10-31 20:02:14 +0000 |
|---|---|---|
| committer | Shipwreckt <me@shipwreckt.co.uk> | 2025-10-31 20:02:14 +0000 |
| commit | 7a52ddeba2a68388b544f529d2d92104420f77b0 (patch) | |
| tree | 15ddd47457a2cb4a96060747437d36474e4f6b4e /node_modules/nunjucks/src/precompiled-loader.js | |
| parent | 53d6ae2b5568437afa5e4995580a3fb679b7b91b (diff) | |
Changed from static to 11ty!
Diffstat (limited to 'node_modules/nunjucks/src/precompiled-loader.js')
| -rw-r--r-- | node_modules/nunjucks/src/precompiled-loader.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/node_modules/nunjucks/src/precompiled-loader.js b/node_modules/nunjucks/src/precompiled-loader.js new file mode 100644 index 0000000..d833c4f --- /dev/null +++ b/node_modules/nunjucks/src/precompiled-loader.js @@ -0,0 +1,31 @@ +'use strict'; + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +var Loader = require('./loader'); +var PrecompiledLoader = /*#__PURE__*/function (_Loader) { + _inheritsLoose(PrecompiledLoader, _Loader); + function PrecompiledLoader(compiledTemplates) { + var _this; + _this = _Loader.call(this) || this; + _this.precompiled = compiledTemplates || {}; + return _this; + } + var _proto = PrecompiledLoader.prototype; + _proto.getSource = function getSource(name) { + if (this.precompiled[name]) { + return { + src: { + type: 'code', + obj: this.precompiled[name] + }, + path: name + }; + } + return null; + }; + return PrecompiledLoader; +}(Loader); +module.exports = { + PrecompiledLoader: PrecompiledLoader +};
\ No newline at end of file |
