Skip to content

Commit

Permalink
Add dev argument to ConfigureOptions
Browse files Browse the repository at this point in the history
There is an undocumented `dev` argument that can be sent to
`nunjucks.configure`, which allows a full error trace to the thrown

(See: mozilla/nunjucks#1430)
  • Loading branch information
pezholio committed Jan 18, 2023
1 parent fc41bdd commit 144638b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions types/nunjucks/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export interface ConfigureOptions {
lstripBlocks?: boolean | undefined;
watch?: boolean | undefined;
noCache?: boolean | undefined;
dev?: boolean | undefined;
web?:
| {
useCache?: boolean | undefined;
Expand Down
2 changes: 2 additions & 0 deletions types/nunjucks/nunjucks-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ nunjucks.configure('views', {
autoescape: true,
watch: true,
});
nunjucks.configure({ dev: true });
rendered = env.renderString(src, ctx);

env.on('load', (name, source, loader) => {});
Expand All @@ -40,6 +41,7 @@ let extension: nunjucks.Extension = {
return 'The parser api is complicated';
},
};

env = env.addExtension('SpawnGlitter', extension);
const hasExtension: boolean = env.hasExtension('SpawnGlitter');
extension = env.getExtension('SpawnGlitter');
Expand Down

0 comments on commit 144638b

Please sign in to comment.