Commit 60855643 by Torkel Ödegaard

Merge pull request #4807 from grafana/makefile

add basic Makefile, remove need for global grunt-cli
parents 6bc898b2 650bb4c7
all: deps build
deps:
go run build.go setup
godep restore
npm install
build:
go run build.go build
npm run build
test:
godep go test -v ./pkg/...
npm test
run:
./bin/grafana-server
...@@ -103,8 +103,7 @@ npm (v2.5.0) and grunt (v0.4.5). Run the following: ...@@ -103,8 +103,7 @@ npm (v2.5.0) and grunt (v0.4.5). Run the following:
```bash ```bash
npm install npm install
npm install -g grunt-cli npm run build
grunt
``` ```
### Recompile backend on source change ### Recompile backend on source change
...@@ -145,4 +144,3 @@ please [sign the CLA](http://docs.grafana.org/project/cla/) ...@@ -145,4 +144,3 @@ please [sign the CLA](http://docs.grafana.org/project/cla/)
Grafana is distributed under Apache 2.0 License. Grafana is distributed under Apache 2.0 License.
Work in progress Grafana 2.0 (with included Grafana backend) Work in progress Grafana 2.0 (with included Grafana backend)
...@@ -306,7 +306,7 @@ func ChangeWorkingDir(dir string) { ...@@ -306,7 +306,7 @@ func ChangeWorkingDir(dir string) {
} }
func grunt(params ...string) { func grunt(params ...string) {
runPrint("./node_modules/grunt-cli/bin/grunt", params...) runPrint("./node_modules/.bin/grunt", params...)
} }
func setup() { func setup() {
......
...@@ -25,12 +25,12 @@ test: ...@@ -25,12 +25,12 @@ test:
# Go test # Go test
- godep go test -v ./pkg/... - godep go test -v ./pkg/...
# js tests # js tests
- ./node_modules/grunt-cli/bin/grunt test - npm test
- npm run coveralls - npm run coveralls
deployment: deployment:
master: master:
branch: master branch: master
owner: grafana owner: grafana
commands: commands:
- ./trigger_grafana_packer.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN} - ./trigger_grafana_packer.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN}
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
"npm": "2.14.x" "npm": "2.14.x"
}, },
"scripts": { "scripts": {
"build": "grunt",
"test": "grunt test", "test": "grunt test",
"coveralls": "grunt karma:coveralls && rm -rf ./coverage" "coveralls": "grunt karma:coveralls && rm -rf ./coverage"
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment