vinyl-transformer
    TypeScript icon, indicating that this package has built-in type declarations

    0.3.0 • Public • Published

    vinyl-transformer

    Create Transformers for Vinyl File Streams

    Version Downloads Build Status ReadMe

    Documentation

    See the documentation for vinyl-transformer

    Usage

    Vinyl FS

    import {src, dest} from "vinyl-fs";
    import {createTransformerFn} from "vinyl-transformer";
     
    let compile = createTransformerFn((file) => {
      file.contents = /* ... */;
    });
     
    let stream = (src("src/**/*.js")
      .pipe(compile())
      .pipe(dest("dist"))
    );

    Gulp

    import gulp from "gulp";
    import {createTransformerFn} from "vinyl-transformer";
     
    let compile = createTransformerFn((file) => {
      file.contents = /* ... */;
    });
     
    gulp.task("compile", () => {
      return (gulp.src("src/**/*.js")
        .pipe(compile())
        .pipe(gulp.dest("dist"))
      );
    });

    Install

    npm i vinyl-transformer

    DownloadsWeekly Downloads

    57

    Version

    0.3.0

    License

    MIT

    Unpacked Size

    7.43 kB

    Total Files

    7

    Last publish

    Collaborators

    • stefanr