Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use npm to execute grunt task, and remove global deps for grunt, bower, and http-server #61

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: node_js
node_js:
- '0.10'
script: make build
script: npm run build
15 changes: 0 additions & 15 deletions Makefile

This file was deleted.

21 changes: 0 additions & 21 deletions example/stocks/README

This file was deleted.

13 changes: 13 additions & 0 deletions example/stocks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## How to display the examples in your environment

####Step 1: `npm run build`

The npm script will execute grunt build which will create the necessary angular-dc.min.js file for the examples to use.

####Step 2: `npm run server`

This will execute a simple node [http-server](https://github.com/indexzero/http-server) instance to host the examples on.

#### Finally: Open URL
- http://127.0.0.1:8080/example/stocks/nasdaq.html
- http://127.0.0.1:8080/example/stocks/pie.html
2 changes: 1 addition & 1 deletion example/stocks/nasdaq.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script type="text/javascript" src="//dc-js.github.io/dc.js/js/dc.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.15/angular.js"></script>
<script type="text/javascript" src="//tardyp.github.io/angular-jade/javascripts/angular-jade-min.js"></script>
<script type="text/javascript" src="/angular-dc/dist/angular-dc.min.js"></script>
<script type="text/javascript" src="/dist/angular-dc.min.js"></script>
<script type="text/javascript" src="colorbrewer.js"></script>
<script type="text/javascript" src="stock.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion example/stocks/pie.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.7/crossfilter.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/dc/1.7.0/dc.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.15/angular.min.js"></script>
<script type="text/javascript" src="/angular-dc/dist/angular-dc.min.js"></script>
<script type="text/javascript" src="/dist/angular-dc.min.js"></script>
</head>
<body ng-app="app">
<!-- we nicely separate the view and the data. Here, all information concerning the way to display the data
Expand Down
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"bower": "^1.3.12",
"connect-livereload": "~0.3.0",
"grunt": "~0.4.1",
"grunt-cli": "*",
"grunt-bump": "0.0.11",
"grunt-cli": "*",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-connect": "~0.5.0",
Expand All @@ -41,13 +41,20 @@
"grunt-ngmin": "0.0.3",
"grunt-open": "~0.2.2",
"grunt-umd": "^2.0.0",
"http-server": "^0.9.0",
"karma": "~0.10.2",
"karma-chrome-launcher": "~0.1.0",
"karma-firefox-launcher": "~0.1.0",
"karma-html2js-preprocessor": "~0.1.0",
"karma-jasmine": "~0.1.3",
"karma-phantomjs-launcher": "~0.1.0",
"karma-script-launcher": "~0.1.0",
"matchdep": "~0.1.2"
"matchdep": "~0.1.2",
"rimraf": "^2.5.4"
},
"scripts": {
"build": "bower install && grunt build",
"prebuild": "rimraf bower_components",
"server": "http-server"
}
}