Tree creates a structured hierarchical JSON from a folder structure
First, install gulp-tree
as a development dependency:
npm install --save-dev gulp-tree
Then, add it to your gulpfile.js
:
var tree = require("gulp-tree");
gulp.src('./src/*.html')
.pipe(tree({
patternsPath: './src/patterns',
jsonPath: './src/json/',
appPath: './src/'
}))
Type: String|Number
Default: ./src/patterns
Directory where the patterns are located
Type: String
Default: './src/json'
Directory where the json should be saved
Tree creates a structured hierarchical JSON from a folder structure