Grunt plugin for working with Go
Not actively maintained anymore. Should work well anyway. Still accepting PRs.
This plugin requires Grunt ~0.4.0
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-go --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-go');
Run this task with the grunt go
command.
Note: All examples are written in Coffeescript.
go:
myapp:
output: "app"
run_files: ["main.go"]
go:
myapp:
root: "myapp"
output: "app"
run_files: ["main.go"]
go:
myapp:
output: "app"
run_files: ["main.go"]
build_flags: ["-tags", "debug"]
go:
options:
GOPATH: ["../myproject"]
myapp:
output: "app"
run_files: ["main.go"]
go:
e2eTest:
cmd: "goapp"
bin: "<%= appengine_sdk %>"
build_flags: ["-tags", "e2e appengine"]
myapp:
output: "app"
run_files: ["main.go"]
The expected syntax is grunt go:<command>:<target>(:<profile>)
.
The command maps to the respective Go command.
Profile is an optional specification
grunt go:build:myapp
grunt go:run:myapp
grunt go:test:myapp
grunt go:test:myapp:e2eTest
grunt go:fmt:myapp
- 2013-08-12 v0.0.1 initial publishing
- 2013-08-30 v0.0.2 allow custom GOOS/GOARCH
- 2013-11-15 v0.0.3 allow custom go command
- 2014-03-25 v0.0.4 minor fixes
Task submitted by Stephan Behnke
This file was generated on Wed Mar 26 2014 16:53:53.