{"action":"created","issue":{"url":"https://api.github.com/repos/d3/d3-scale/issues/3","labels_url":"https://api.github.com/repos/d3/d3-scale/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/d3/d3-scale/issues/3/comments","events_url":"https://api.github.com/repos/d3/d3-scale/issues/3/events","html_url":"https://github.com/d3/d3-scale/issues/3","id":91092944,"number":3,"title":"Some devDependencies should be dependencies?","user":{"login":"curran","id":68416,"avatar_url":"https://avatars.githubusercontent.com/u/68416?v=3","gravatar_id":"","url":"https://api.github.com/users/curran","html_url":"https://github.com/curran","followers_url":"https://api.github.com/users/curran/followers","following_url":"https://api.github.com/users/curran/following{/other_user}","gists_url":"https://api.github.com/users/curran/gists{/gist_id}","starred_url":"https://api.github.com/users/curran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/curran/subscriptions","organizations_url":"https://api.github.com/users/curran/orgs","repos_url":"https://api.github.com/users/curran/repos","events_url":"https://api.github.com/users/curran/events{/privacy}","received_events_url":"https://api.github.com/users/curran/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-25T22:27:56Z","updated_at":"2015-06-26T01:46:41Z","closed_at":"2015-06-25T23:34:43Z","body":"I noticed that `d3-interpolate` and `d3-format` are listed under `devDependencies` rather than `dependencies` in `package.json`, however they are hard dependencies (as in, the Rollup build breaks if they are not installed). Perhaps these should be promoted to dependencies?\r\n\r\nHere are some notes from my experience trying to use only the ticks functionality of `d3-scale`:\r\n\r\nWhen importing `linear` from `d3-scale`, I get the following error when running Rollup:\r\n\r\n`Could not find package d3-interpolate (required by /Users/curran/repos/data-reduction/node_modules/d3-scale/src/linear.js)`\r\n\r\nAlso, after I `npm install d3-interpolate`, I get another error:\r\n\r\n`Could not find package d3-color (required by /Users/curran/repos/data-reduction/node_modules/d3-interpolate/src/interpolators.js)`\r\n\r\nNow I need to install `d3-color` to use `d3-scale`, however I just want to use the ticks functionality from `d3-scale`. This feels like it should not be necessary.\r\n\r\nAfter installing `d3-color`, I get another error:\r\n\r\n`Could not find package d3-format (required by /Users/curran/repos/data-reduction/node_modules/d3-scale/src/tickFormat.js)`\r\n\r\nAfter installing `d3-format`, the build works. In the end, it is necessary to install `d3-interpolate`, `d3-color` and `d3-format` in order to use the tick generation functionality from d3-scale."},"comment":{"url":"https://api.github.com/repos/d3/d3-scale/issues/comments/115457315","html_url":"https://github.com/d3/d3-scale/issues/3#issuecomment-115457315","issue_url":"https://api.github.com/repos/d3/d3-scale/issues/3","id":115457315,"user":{"login":"curran","id":68416,"avatar_url":"https://avatars.githubusercontent.com/u/68416?v=3","gravatar_id":"","url":"https://api.github.com/users/curran","html_url":"https://github.com/curran","followers_url":"https://api.github.com/users/curran/followers","following_url":"https://api.github.com/users/curran/following{/other_user}","gists_url":"https://api.github.com/users/curran/gists{/gist_id}","starred_url":"https://api.github.com/users/curran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/curran/subscriptions","organizations_url":"https://api.github.com/users/curran/orgs","repos_url":"https://api.github.com/users/curran/repos","events_url":"https://api.github.com/users/curran/events{/privacy}","received_events_url":"https://api.github.com/users/curran/received_events","type":"User","site_admin":false},"created_at":"2015-06-26T01:46:41Z","updated_at":"2015-06-26T01:46:41Z","body":"I was under the impression that Rollup does exactly that, by looking at `jsnext:main` (in [defaultExternalResolver](https://github.com/rollup/rollup/blob/0c4d139655c7b50bc555bdda726e8cc8dab5448a/src/utils/resolvePath.js#L21)). So `import {linear} from \"d3-scale\"` will be resolved at the top level node_modules (`d3-scale/index.js`) via the `jsnext:main` declaration in `d3-scale/package.json`. It sounds like you are saying d3-bundler forces only this behavior, and does not allow any other kinds of external resolving to happen.\r\n\r\nIn an ideal world, it would be cool to have something like `jsnext:dependencies` as a special property of `package.json` for ES6 packages to declare their dependencies on other ES6 packages that live in NPM. Then there could be some tool that wraps `npm install` and traverses the `jsnext:dependencies` dependency graph. Or, maybe such an installer tool could just assume that all external imports correspond to NPM modules. I could imagine a command `rollup install` that does this, because Rollup already can parse the ES6 dependency graph structure from source files. I wonder if this is something @Rich-Harris has thought about...\r\n\r\nIndeed we are in the wild west of ES6, but the way you have set things up is the cleanest and simplest I have seen so far, and I'm thrilled that I can actually write code that depends on the new d3 modules via Rollup and NPM and actually works."}}