Skip to content

forestjohnsonpeoplenet/gulp-go

 
 

Repository files navigation

gulp-go

Build Status David DM

go run for gulp

Install

npm install gulp-go

Usage

var gulp   = require("gulp");
var gulpgo = require("gulp-go");

var go;

gulp.task("go-run", function() {
  go = gulpgo.run("main.go", ["--arg1", "value1"], {
    cwd: __dirname,
    onStdout: function(buffer) { console.log(buffer.toString('utf8')); },
    onStderr:  function(buffer) { console.error(buffer.toString('utf8')); }
  });
});

gulp.task("devs", ["go-run"], function() {
  gulp.watch([__dirname+"/**/*.go"]).on("change", function() {
    go.restart();
  });
});

License

MIT

About

go run for gulp

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 85.7%
  • Go 8.9%
  • Makefile 3.2%
  • Shell 2.2%