gulp-file-additional
A gulp helper, add additional data to file and list all files in the gulp pipeline.
Install
Install with npm
npm install --save-dev gulp-file-additional
Example
var fileAdditional = ;var twigFile = 'src/pages/**/*.html.twig'; gulp
type gulp
in terminal, change twigFile, then output:
[gulp] Using file ./src/pages/normal.html.twig
[gulp] Additional data {"key":"data","value":"test"}
Options
defaults
logfile: on: true prefix: 'Using file' color: 'magenta' path: 'cwd' additional: on: true prefix: 'Additional data' color: 'magenta' data: {}
logfile
on
- type:
boole
- default:
true
- values:
true
,false
prefix
- type:
string
- default:
Using file
color
- type:
string
- default:
magenta
- values:
black
,blue
,cyan
,gray
,green
,magenta
,red
,white
,yellow
path
- type:
string
- default:
cwd
- values:
cwd
,path
,relative
additional
on
the same as logfile
prefix
the same as logfile
color
the same as logfile
data
- type:
array
orobject
- default:
{}
key: 'data' // force convert to string { return 'test'; }
or
key: 'foo' { // function return 'test'; } key: 'bar' value: 'test' // string key: 'foobar' value: 110 // number