(engineName, libraryInstance)
| 846 | * Library Overrides and Options |
| 847 | */ |
| 848 | setLibrary(engineName, libraryInstance) { |
| 849 | if (engineName === "liquid" && Object.keys(this.liquid.options).length) { |
| 850 | debug( |
| 851 | "WARNING: using `eleventyConfig.setLibrary` will override any configuration set using `.setLiquidOptions` via the config API. You’ll need to pass these options to the library yourself.", |
| 852 | ); |
| 853 | } else if (engineName === "njk" && Object.keys(this.nunjucks.environmentOptions).length) { |
| 854 | debug( |
| 855 | "WARNING: using `eleventyConfig.setLibrary` will override any configuration set using `.setNunjucksEnvironmentOptions` via the config API. You’ll need to pass these options to the library yourself.", |
| 856 | ); |
| 857 | } |
| 858 | |
| 859 | this.libraryOverrides[engineName.toLowerCase()] = libraryInstance; |
| 860 | } |
| 861 | |
| 862 | /* These callbacks run on both libraryOverrides and default library instances */ |
| 863 | amendLibrary(engineName, callback) { |
no outgoing calls
no test coverage detected