Grunt plugin for working with Go
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
tasks
test
.gitattributes
.gitignore
.jshintrc
.npmignore
.travis.yml
AUTHORS
CHANGELOG
CONTRIBUTING.md
Gruntfile.js
LICENSE
README.md
package.json

README.md

grunt-go Build Status

Grunt plugin for working with Go

Not actively maintained anymore. Should work well anyway. Still accepting PRs.

Getting Started

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');

Go task

Run this task with the grunt go command.

Usage Example

Note: All examples are written in Coffeescript.

Configuration

Basic
go:
  myapp:
    output: "app"
    run_files: ["main.go"]
With custom (file) root
go:
  myapp:
  	root: "myapp"
    output: "app"
    run_files: ["main.go"]
With custom build flags
go:
  myapp:
    output: "app"
    run_files: ["main.go"]
    build_flags: ["-tags", "debug"]
With custom 'GOROOT'
go:
  options:
    GOPATH: ["../myproject"]

  myapp:
    output: "app"
    run_files: ["main.go"]
E2E testing with App Engine
go:
  e2eTest:
    cmd: "goapp"
    bin: "<%= appengine_sdk %>"
    build_flags: ["-tags", "e2e appengine"]

  myapp:
    output: "app"
    run_files: ["main.go"]

Execution

The expected syntax is grunt go:<command>:<target>(:<profile>). The command maps to the respective Go command. Profile is an optional specification

Build app
grunt go:build:myapp
Run app
grunt go:run:myapp
Test app
grunt go:test:myapp
Test app with specific profile
grunt go:test:myapp:e2eTest
Format source code
grunt go:fmt:myapp

Release History

  • 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.