Skip to content
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
18 changes: 16 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ module.exports = function (grunt) {
}
},

'html-prettyprinter-dir': {
expansion: {
src: [
'examples/*.html'
],
dest: 'examples/'
}
},

jshint: {
options: {
curly: true,
Expand All @@ -48,14 +57,17 @@ module.exports = function (grunt) {
noarg: true,
sub: true,
undef: true,
unused: true,
unused: false, //!
boss: true,
eqnull: true,
browser: true,
node: true,
jquery: true,
globals: {
d3: true
d3: true,
define: true,
require: true,
BootstrapD3: true
}
},
files: [
Expand Down Expand Up @@ -115,10 +127,12 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-jsbeautifier');
grunt.loadNpmTasks('grunt-html-prettyprinter');

// Default task.
grunt.registerTask('default', [
'jsbeautifier',
'html-prettyprinter-dir',
'jshint',
//'qunit',
'concat',
Expand Down
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,48 @@ Integrating d3js with twitter.bootstrap.

### Running the examples on Windows

Make sure node.js is installed (we use [Chocolatey][1] a lot):
Make sure [node.js][2] is installed (we use [Chocolatey][1] a lot):

cinst nodejs.install

Note that this package (in contrary to `nodejs`) includes NPM.
Note that this package (in contrary to `nodejs`) includes [NPM][5].

Install grunt and bower:

### Installing Development Tools

Install [Grunt][3] and [Bower][4]:

npm install -g grunt-cli
npm install -g bower

Form the project root, run:

npm install
bower install
grunt

The first command will install all dependencies for this project,
the second will run the default tasks in Gruntfile.js.
This all should run without errros
The first command and second commands will install all dependencies for this project. The third will execute the default build task. This all should run without errors

Next install this projects dependencies:

How should this be done? I'm missing jQuery and d3js. Running bower does nothing.
### Running The Local Server

Then, from the root of the project run:
Then, from the root of the project run the provided local server:

node app.js

and browse to http://localhost:8888/examples/pie-chart.html

### Development Mode

The grunt file provided also has a development mode, which is set to beautify the JS as well as run JSHint on it on every save. To do this, at the root of the project, run the following:

grunt develop

Keep the terminal window open. Upon save, messages from the executed task will appear on that window.


[1]: http:///chocolatey.org
[2]: http://nodejs.org/
[3]: http://gruntjs.com/
[4]: http://bower.io/
[5]: https://npmjs.org/

11 changes: 11 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "bootstrap-d3",
"version": "0.0.0",
"dependencies": {
"d3": "3.1.5",
"jquery": "~2.0.2",
"d3-tip": "~0.5.2",
"bootstrap": "~2.3.2",
"tipsy": "~1.0.0a"
}
}
Loading