File tree Expand file tree Collapse file tree
packages/patternengine-node-nunjucks/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 TODO
33 - Make sure regex match Nunjucks features and syntax
44 - Look into if we need to handle partials in the render method
5- - Replace 'source/patterns' string with a config variable from PL if possible
65 - Add try catch blocks to prevent Pl from crashing
76 - Test methods of including files
87 - Compare features and syntax with the mustache version so we can document
1110
1211"use strict" ;
1312
14- var _shuffle = require ( 'lodash/shuffle' ) ;
15- var _take = require ( 'lodash/take' ) ;
16- var nunjucks = require ( 'nunjucks' ) ;
17- var env = nunjucks . configure ( 'source/_patterns/' ) ;
18- var partialRegistry = [ ] ;
13+ var path = require ( 'path' ) ,
14+ plPath = process . cwd ( ) ,
15+ plConfig = require ( path . join ( plPath , 'patternlab-config.json' ) ) ,
16+ _shuffle = require ( 'lodash/shuffle' ) ,
17+ _take = require ( 'lodash/take' ) ,
18+ nunjucks = require ( 'nunjucks' ) ,
19+ env = nunjucks . configure ( plConfig . paths . source . patterns ) ,
20+ partialRegistry = [ ] ;
1921
2022
2123////////////////////////////
You can’t perform that action at this time.
0 commit comments