From a34a784b43dcd453f43eccd96749fc18395a6a50 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lespiau Date: Mon, 2 May 2016 20:36:06 +0200 Subject: [PATCH 1/2] Add more documentation on how to contribute Add more documentation on how to fork the project, and how to build on changes using grunt --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index d538ba78e1e..b92a9d5236f 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,18 @@ the latest master builds [here](http://grafana.org/download/builds) go get github.com/grafana/grafana ``` +Since imports of dependencies use the absolute path github.com/grafana/grafana within the $GOPATH, +you will need to put your version of the code in $GOPATH/src/github.com/grafana/grafana to be able +to develop and build grafana on a cloned repository. To do so, you can clone your forked repository +directly to $GOPATH/src/github.com/grafana or you can create a symbolic link from your version +of the code to $GOPATH/src/github.com/grafana/grafana. The last options makes it possible to change +easily the grafana repository you want to build. +```bash +go get github.com/*your_account*/grafana +mkdir $GOPATH/src/github.com/grafana +ln -s github.com/*your_account*/grafana $GOPATH/src/github.com/grafana/grafana +``` + ### Building the backend Replace X.Y.Z by actual version number. ```bash @@ -106,6 +118,13 @@ npm install npm run build ``` +To build the frontend assets only on changes: + +```bash +sudo npm install -g grunt-cli # to do only once to install grunt command line interface +grunt watch +``` + ### Recompile backend on source change To rebuild on source change (requires that you executed godep restore) ```bash From ca1182e783077397ebd4ac44ad586ab47a7f5f6a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lespiau Date: Mon, 2 May 2016 20:42:25 +0200 Subject: [PATCH 2/2] Stress the required version of node JS --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b92a9d5236f..65cb830a522 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ the latest master builds [here](http://grafana.org/download/builds) ### Dependencies - Go 1.5 -- NodeJS +- NodeJS v0.12.0 - [Godep](https://github.com/tools/godep) ### Get Code @@ -110,7 +110,7 @@ go run build.go build ### Building frontend assets -To build less to css for the frontend you will need a recent version of of node (v0.12.0), +To build less to css for the frontend you will need a recent version of of **node (v0.12.0)**, npm (v2.5.0) and grunt (v0.4.5). Run the following: ```bash