File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,28 @@ src src
6363
6464Somewhere in gulpfile.js:
6565``` javascript
66+ // It is optional now, but you able to tune it as you wish.
67+ // You can pass the settings by an object, or you can pass it using package.json
68+ const jsonLoaderSettings = {
69+ // Chose where the source files are located.
70+ // Use sourcePath or the pare of pathHtml and pathData
71+
72+ // sourcePath: 'src',
73+ pathHtml: ' src/html' ,
74+ pathData: ' src/data' ,
75+
76+ // The namespace where the Data is located.
77+ // To get some loaded data from the JSON in a PUG context use syntax:
78+ // $.href or $.imports.menu
79+ dataEntry: ' $' ,
80+
81+ // It needs for the Date object to show a local date
82+ locales: ' en-GB' ,
83+
84+ // Will report about the loaded JSON files
85+ report: true ,
86+ };
87+
6688const gulp = require (' gulp' );
6789const plugins = require (' gulp-load-plugins' )();
6890const jsonLoaderFactory = require (' ./lib/gulp-json-loader' );
You can’t perform that action at this time.
0 commit comments