generator-dashing-go v0.0.1
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.
Requirements
Installation
Install Yeoman:
npm install -g yoInstall the dashing-go generator:
npm install -g generator-dashing-goCreating 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-goGrab the Go dependencies:
go getStart the server:
go run server.goThe 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 initHot 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 serveBuilding Stuff
grunt buildIf you need to build just application.js or application.css, you may run each task individually:
grunt js
grunt cssMinifying Stuff
grunt minifyapplication.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 fooNote 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.
12 years ago