Skip to content

Commit

Permalink
Add component.json to appease Bower.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Sep 14, 2012
1 parent 39347b4 commit d123998
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ LOCALE ?= en_US
all: \
d3.v2.js \
d3.v2.min.js \
component.json \
package.json

# Modify this rule to build your own custom release.
Expand Down Expand Up @@ -237,6 +238,11 @@ d3%.js: Makefile
cat $(filter %.js,$^) | $(JS_BEAUTIFIER) > $@
@chmod a-w $@

component.json: src/component.js
@rm -f $@
node src/component.js > $@
@chmod a-w $@

package.json: src/package.js
@rm -f $@
node src/package.js > $@
Expand Down
5 changes: 5 additions & 0 deletions component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "d3",
"version": "2.10.1",
"main": "./d3.v2.js"
}
7 changes: 7 additions & 0 deletions src/component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require("./core/core");

require("util").puts(JSON.stringify({
"name": "d3",
"version": d3.version,
"main": "./d3.v2.js"
}, null, 2));

0 comments on commit d123998

Please sign in to comment.