gulp-multi-extend
A gulp plugin to extend JSON contents with a separate JSON file. Uses node.extend plugin for extend.
Usage
var gulp = ;var extend = ;var path = ; // Extend JSON files in ./files/to/extend/ folder// with contents of ./file/to/extend/with.json// and output files into ./dist foldergulp ; // Process with.json file with processJSON function { var basename = path; // e.g. /path/to/files/to/extend/en.json -> en return contentsbasename;} gulp ;
API
extend(filePath[, processFn [, jsonSpace]])
filePath
Type: String
The JSON file to extend other files with
processFn
Type: Function(srcFilePath, contents)
Default: undefined
Params:
srcFilePath
- The file path given fromgulp.src
contents
- The JSON contents of the file given to extend infilePath
jsonSpace
Type: String
or Number
Default: undefined
Number of spaces used for pretty printing JSON.