gulp-script-inject

0.0.6 • Public • Published

gulp-script-inject

Plugin to inject variables from filenames from a directory. Used for tapestry

Usage

First, install gulp-script-inject as a development dependency:

npm install --save-dev gulp-script-inject

Then, add it to your gulpfile.js:

var scriptInject = require('gulp-script-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

License

MIT License

Readme

Keywords

Package Sidebar

Install

npm i gulp-script-inject

Weekly Downloads

1

Version

0.0.6

License

none

Last publish

Collaborators

  • rmdort