Please forgive me if I lack the appropriate unix knowledge and tell me if it's not worth while trying. Maybe it's so easy it doesn't even get asked on SO.
So I wanted to build a custom variant of d3 without any projection and geo stuff to save bandwidth and ideally change the locale as well.
So far I have learned (I am on OSX 10.7.5, local user has admin priviledges, node.js was installed from official binaries, homebrew was not used/installed):
- you need to have xcode installed (free on the app store)
- within xcode you need to install the command line tools
after that the following works (there are only a few warnings about missing readme files)
npm install d3 topojson queue-async smash uglify-js
after that it's all errors (see below).
Do you need to make the Makefile executable (chmod +x) ?
Does the smash wiki show a complete Makefile or are there parts that one is expected to put in?
this is my terminal output:
myMac:Sites d3user$ make lib.js
node_modules/.bin/smash node_modules/d3/src/start.js node_modules/d3/src/arrays/map.js node_modules/d3/src/arrays/nest.js node_modules/d3/src/format/format.js node_modules/d3/src/geo/conic-conformal.js node_modules/d3/src/geo/path.js node_modules/d3/src/geom/quadtree.js node_modules/d3/src/layout/force.js node_modules/d3/src/scale/sqrt.js node_modules/d3/src/selection/selection.js node_modules/d3/src/transition/transition.js node_modules/d3/src/xhr/json.js node_modules/d3/src/end.js | node_modules/.bin/uglifyjs - -c -m -o lib.js
WARN: ERROR: Unexpected token: eof (undefined) [-:582,19]
/Users/d3user/Sites/node_modules/uglify-js/lib/parse.js:199
throw new JS_Parse_Error(message, line, col, pos);
^
Error
at new JS_Parse_Error (/Users/d3user/Sites/node_modules/uglify-js/lib/parse.js:185:18)
at js_error (/Users/d3user/Sites/node_modules/uglify-js/lib/parse.js:199:11)
at croak (/Users/d3user/Sites/node_modules/uglify-js/lib/parse.js:630:9)
at token_error (/Users/d3user/Sites/node_modules/uglify-js/lib/parse.js:638:9)
at unexpected (/Users/d3user/Sites/node_modules/uglify-js/lib/parse.js:644:9)
at block_ (/Users/d3user/Sites/node_modules/uglify-js/lib/parse.js:937:28)
at ctor.body (/Users/d3user/Sites/node_modules/uglify-js/lib/parse.js:911:25)
at function_ (/Users/d3user/Sites/node_modules/uglify-js/lib/parse.js:916:15)
at /Users/d3user/Sites/node_modules/uglify-js/lib/parse.js:755:24
at /Users/d3user/Sites/node_modules/uglify-js/lib/parse.js:677:24
events.js:72
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at errnoException (net.js:878:11)
at Object.afterWrite (net.js:695:19)
make: *** [lib.js] Error 8
Thanks in advance
Michael