Skip to content

Commit c0aa322

Browse files
committed
Add grunt configuration
1 parent 6feb7b9 commit c0aa322

File tree

5 files changed

+73
-25
lines changed

5 files changed

+73
-25
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.DS_Store
1+
.DS_Store
2+
node_modules

Gruntfile.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = function(grunt) {
2+
grunt.initConfig({
3+
pkg: grunt.file.readJSON('package.json'),
4+
jshint: {
5+
all: ['Gruntfile.js', 'Graph.js', 'drawings/*.js', 'layouts/*.js', 'utils/*.js']
6+
},
7+
uglify: {
8+
options: {
9+
banner: '/*! <%= pkg.name %> <%= pkg.version %> */\n'
10+
},
11+
graphVisualization: {
12+
files: {
13+
'build/graph.min.js': ['Graph.js', 'webgl-frameworks/three.min.js', 'utils/*.js', 'layouts/*.js', 'drawings/*.js']
14+
}
15+
}
16+
}
17+
});
18+
19+
grunt.loadNpmTasks('grunt-contrib-jshint');
20+
grunt.loadNpmTasks('grunt-contrib-uglify');
21+
22+
grunt.registerTask('default', ['jshint', 'uglify']);
23+
};

README.markdown

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
1-
Graph-Visualization
2-
===================
1+
# Graph-Visualization
32

43
This project is about 3D graph visualization with WebGL. The aim of this project is to evaluate the possibilities of graph drawing in WebGL.
54

65
This project uses Three.js for drawing and currently supports a force directed layout.
76

87

9-
### Run the example ###
8+
### Run the example
109

1110
1. Clone or download the project
1211
2. Open the index_sample.html in a WebGL-compatible browser
1312

1413
You may copy the index_sample.html to index.html and customize it.
1514

16-
Project Description
17-
-------------------
15+
## Project Description
1816

1917
The project consists of
2018

2119
- a graph structure
2220
- a graph layout implementation
2321
- and a graph drawing implementation
2422

25-
### Graph Structure ###
23+
### Graph Structure
2624

2725
This is implemented in graph-visualization/Graph.js.
2826

@@ -47,7 +45,7 @@ A node has the properties
4745

4846
For more details have a look at the [source code](https://github.com/davidpiegza/Graph-Visualization/blob/master/Graph.js).
4947

50-
### Graph Layout ###
48+
### Graph Layout
5149

5250
A graph layout has the basic structure:
5351

@@ -71,7 +69,20 @@ The graph layout may extend the nodes and edges with custom properties in the da
7169
See [force-based-layout.js](https://github.com/davidpiegza/Graph-Visualization/blob/master/layouts/force-based-layout.js) for example usage.
7270

7371

74-
Changelog
75-
-------------------
72+
## Contribution
73+
74+
This project uses [Grunt](http://gruntjs.com/) to run several tasks in development. You should have `npm` and `grunt` installed. To install `grunt` run
75+
76+
npm install -g grunt-cli
77+
78+
And to install all dependencies run
79+
80+
npm install
81+
82+
For more info check the [Grunt - Getting started guide](http://gruntjs.com/getting-started).
83+
84+
If you added some changes, run `grunt` to check the code.
85+
86+
## Changelog
7687

7788
See [releases](https://github.com/davidpiegza/Graph-Visualization/releases).

build/graph.min.js

Lines changed: 18 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "graph-visualization",
3+
"version": "0.4.0",
4+
"devDependencies": {
5+
"grunt": "~0.4.5",
6+
"grunt-contrib-jshint": "~0.10.0",
7+
"grunt-contrib-nodeunit": "~0.4.1",
8+
"grunt-contrib-uglify": "~0.5.0"
9+
}
10+
}

0 commit comments

Comments
 (0)