Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var getJsonData = function(file) {
- return require(path.dirname(file.path) + '/' + path.basename(file.path, '.nunjucks') + '.json');
- };
- gulp.task('json', function() {
- return gulp.src('./build/nunjucks/pages/**/*.nunjucks')
- .pipe(data(getJsonData))
- .pipe( gulpIf(data.pages, function() {
- for (i = 0, i < pages, i++) {
- .pipe(nunjucksRender({
- path: ['./build/nunjucks/templates']
- }));
- .pipe(gulp.dest('./build'));
- data.number++;
- }
- }))
- // need a for loop here
- .pipe(nunjucksRender({
- path: ['./build/nunjucks/templates']
- }))
- .pipe(gulp.dest('./build'));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement