ng-mural-patterns-inject
v0.1.3
Published
A gulp plugin to inject JS variables after reading from a directory
Downloads
3
Readme
ng-mural-patterns-inject
Plugin to inject variables from filenames from a directory. Used for tapestry
Usage
First, install ng-mural-patterns-inject
as a development dependency:
npm install --save-dev ng-mural-patterns-inject
Then, add it to your gulpfile.js
:
var scriptInject = require('ng-mural-patterns-inject'),
prunehtml = require('gulp-prune-html');
gulp.src('./src/index.html')
.pipe(prunehtml(['#YamlPath']))
.pipe(scriptInject({
json: './src/json'
}))
.pipe(gulp.dest('./src'))
API
scriptInject(options)
options.path
Type: String|Number
Default: 35729
Folder path of files to be read
options.varname
Type: String
Default: yamlPath
Variable name