Skip to content

gigablah/generator-dashing-go

Repository files navigation

generator-dashing-go

This is a Yeoman generator for creating dashboards with the dashing-go library, a Go port of Shopify/dashing.

The dashboard runs on the Martini microframework, while the frontend dependencies are managed by Grunt and Bower.

screenshot

For a live demo, check out the sample dashboard.

Requirements

Installation

Install Yeoman, and dependencies:

npm install -g yo grunt grunt-cli bower

Install the dashing-go generator:

npm install -g generator-dashing-go

Creating a project

Create a new directory:

mkdir my-dashboard && cd $_

Generate the project (this will also run the initial Bower and Grunt tasks):

yo dashing-go

Grab the Go dependencies:

go get

Start the server:

go run server.go

The sample dashboard is now available at http://localhost:3000.

Asset pipeline

The init task copies third party assets (installed by Bower) into position and compiles BatmanJS. This should have been run automatically as a post-install script, but if you've added new dependencies or need to do it manually:

bower install
grunt init

Hot reloading

You may also start a livereload server that watches the assets directory for changes and runs the build pipeline automatically. When you access it (port 9000 by default), it injects a script into the page that initiates a reload whenever the compiled assets are updated.

grunt serve

Building Stuff

grunt build

If you need to build just application.js or application.css, you may run each task individually:

grunt js
grunt css

Minifying Stuff

grunt minify

application.js and application.css are minified in-place.

Generating Stuff

Create new dashboards, jobs and widgets:

yo dashing-go:dashboard foo
yo dashing-go:job foo
yo dashing-go:widget foo

Note the following naming conventions (the generator automatically enforces them):

  • dashed-slug for widget and dashboard names
  • under_score for Go job filenames
  • camelCase for Go job structs

Existing third party Dashing widgets should be compatible with dashing-go.

License

Released under the MIT license.

About

A Yeoman generator for Go-powered Dashing dashboards.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published