Skip to content

Commit 8238584

Browse files
committed
Replace submodule with package.json.
This is better, because now we can enumerate all of our dependencies without embedding them as submodules. After pulling, run `npm install`.
1 parent b7fb05a commit 8238584

6 files changed

Lines changed: 42 additions & 8 deletions

File tree

.gitignore

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

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "lib/uglify-js"]
2-
path = lib/uglify-js
3-
url = git://github.com/mishoo/UglifyJS.git

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
JS_COMPILER = \
2-
./lib/uglify-js/bin/uglifyjs
1+
# See the README for installation instructions.
2+
3+
JS_COMPILER = ./node_modules/uglify-js/bin/uglifyjs
4+
JS_TESTER = ./node_modules/vows/bin/vows
35

46
all: \
57
d3.js \
@@ -188,7 +190,7 @@ d3.geom.js: \
188190
src/end.js
189191

190192
test: all
191-
@vows
193+
@$(JS_TESTER)
192194

193195
%.min.js: %.js Makefile
194196
@rm -f $@

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,24 @@ built-in server:
2828
python -m SimpleHTTPServer 8888
2929

3030
Once this is running, go to: <http://localhost:8888/examples/>
31+
32+
### Development Setup
33+
34+
This repository should work out of the box if you just want to create new
35+
visualizations using D3. On the other hand, if you want to extend D3 with new
36+
features, fix bugs, or run tests, you'll need to install a few more things.
37+
38+
D3's test framework uses [Vows](http://vowsjs.org), which depends on
39+
[Node.js](http://nodejs.org/) and [NPM](http://npmjs.org/). If you are
40+
developing on Mac OS X, an easy way to install Node and NPM is using
41+
[Homebrew](http://mxcl.github.com/homebrew/):
42+
43+
brew install node
44+
brew install npm
45+
46+
Next, from the root directory of this repository, install D3's dependencies:
47+
48+
npm install
49+
50+
You can see the list of dependencies in package.json. The packages will be
51+
installed in the node_modules directory.

lib/uglify-js

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "d3",
3+
"version": "1.29.5",
4+
"description": "A small, free JavaScript library for manipulating documents based on data.",
5+
"keywords": ["dom", "w3c", "visualization", "svg", "animation", "canvas"],
6+
"homepage": "http://mbostock.github.com/d3/",
7+
"author": {"name": "Mike Bostock", "url": "http://bost.ocks.org/mike"},
8+
"repository": {"type": "git", "url": "http://github.com/mbostock/d3.git"},
9+
"dependencies": {
10+
"uglify-js": "1.0.6",
11+
"jsdom": "0.2.3",
12+
"vows": "0.5.10"
13+
}
14+
}

0 commit comments

Comments
 (0)