How to use the FileSystemLoader function from nunjucks
Find comprehensive JavaScript nunjucks.FileSystemLoader code examples handpicked from public code repositorys.
165 166 167 168 169 170 171 172 173 174pathNormalizer(siteConfiguration.dir.input), normalize(path.normalize(".")), ]; console.log("nunjucksFileSystem", nunjucksFileSystem); let nunjucksEnvironment = Nunjucks.configure( new Nunjucks.FileSystemLoader(nunjucksFileSystem), { throwOnUndefined: throwOnUndefinedSetting, autoescape: true, }
+ 2 other calls in file
8 9 10 11 12 13 14 15 16 17 18const postcssPresetEnv = require('postcss-preset-env'); const highlight = require('highlight.js'); const prettier = require('prettier'); const nunjucksEnvironment = new nunjucks.Environment( new nunjucks.FileSystemLoader(path.resolve(__dirname, 'src', 'docs')), { throwOnUndefined : true, }, )
+ 4 other calls in file
GitHub: nihruk/design-system
13 14 15 16 17 18 19 20 21 22 23.join('/') } function createEnvironment() { const environment = new nunjucks.Environment( new nunjucks.FileSystemLoader( path.resolve(__dirname, '..'), { throwOnUndefined: true, },
+ 3 other calls in file
4 5 6 7 8 9 10 11 12 13autoescape = opts.autoescape === undefined ? true : opts.autoescape, noCache = opts.noCache || false, watch = opts.watch || false, throwOnUndefined = opts.throwOnUndefined || false, env = new nunjucks.Environment( new nunjucks.FileSystemLoader(path || 'views', { noCache: noCache, watch: watch, }), { autoescape: autoescape,
+ 3 other calls in file
14 15 16 17 18 19 20 21 22 23setLibrary(env) { this.njkEnv = env || new NunjucksLib.Environment( new NunjucksLib.FileSystemLoader([ super.getIncludesDir(), TemplatePath.getWorkingDir() ]) );
+ 2 other calls in file
nunjucks.configure is the most popular function in nunjucks (144 examples)