gulp-yield-prefix

1.0.4 • Public • Published

gulp-yield-prefix

NPM version

A yield-prefix plugin for gulp 3

Usage

First, install gulp-yield-prefix as a development dependency:

npm install --save-dev gulp-yield-prefix

Then, add it to your gulpfile.js:

var yieldPrefix = require('gulp-yield-prefix');
gulp.task('yieldPrefix', function(){
return gulp.src('js/plot/*.js')
    .pipe(yieldPrefix(["ts", "tm"]))
    .pipe(gulp.dest('js/plot/dist/'));
});
 

Input

function hello(){
    tm(1);
    ts(2);
    a(3);
}

Output

function hello(){
    yield tm(1);
    yield ts(2);
    a(3);
}

API

md2json(targetFuncs)

targetFuncs

Type: Array

Function names to prefix "yield".

Readme

Keywords

Package Sidebar

Install

npm i gulp-yield-prefix

Weekly Downloads

4

Version

1.0.4

License

MIT

Last publish

Collaborators

  • blackmiaool