1

I have seen several imports here: https://github.com/mbostock/d3/blob/master/src/svg/axis.js

If I try to search for documentation about how that may be made all the results I get are of the kind: "there is no import in Javascript". Example: How do I include a JavaScript file in another JavaScript file?

I am guessing it is a node.js thing, but I've seen require used and not import, so this may be a different framework or tool.

How is this possible? It looks quite cool. Thank you.

asked Jul 11, 2013 at 23:47

1 Answer 1

2

D3 is indeed using NodeJS running a dev package named Smash that converts those import into concatenated files.

answered Jul 11, 2013 at 23:55
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.