1.0.3 • Published 5 years ago

gulp-post v1.0.3

Weekly downloads
340
License
MIT
Repository
github
Last release
5 years ago

gulp-post

NPMNPM

npm npm npm npm

bitHound Overall Score Inline docs Build Status Coverage Status

GitHub stars GitHub watchers

Post buffer to current url on pipe.

var post = require("gulp-post");

gulp.task("post",function(){
    gulp.src("src/**/*.js")
        .pipe(post("http://www.zhso.net/"))
        .pipe(gulp.dest("dist"));
});

Features

  • Custom post params
  • Support buffer encoding
  • Support current callback

Installation

$ npm i gulp-post

Examples

  • Custom Options
var post = new require("gulp-post");

gulp.task("build",function(){
    var options = {
                encoding: "base64",
                callback: function (err, data) {
                    if(err){
                        console.error(err);
                    }else{
                        console.log(data);
                    }
                },
                param1: "value1",
                param2: "value2"
                //...
    };
    gulp.src("src/**/*.js")
        .pipe(post("http://www.zhso.net/",options))
        .pipe(gulp.dest("dist"));
})

Options Format

  • options.content file content
  • options.encoding buffer.toString() encoding
  • options.relative file relative
1.0.3

5 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.1

8 years ago