{"action":"created","issue":{"url":"https://api.github.com/repos/Turfjs/turf/issues/303","repository_url":"https://api.github.com/repos/Turfjs/turf","labels_url":"https://api.github.com/repos/Turfjs/turf/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/Turfjs/turf/issues/303/comments","events_url":"https://api.github.com/repos/Turfjs/turf/issues/303/events","html_url":"https://github.com/Turfjs/turf/issues/303","id":131026670,"number":303,"title":"A build that uses ES6 modules","user":{"login":"gajus","id":973543,"avatar_url":"https://avatars.githubusercontent.com/u/973543?v=3","gravatar_id":"","url":"https://api.github.com/users/gajus","html_url":"https://github.com/gajus","followers_url":"https://api.github.com/users/gajus/followers","following_url":"https://api.github.com/users/gajus/following{/other_user}","gists_url":"https://api.github.com/users/gajus/gists{/gist_id}","starred_url":"https://api.github.com/users/gajus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gajus/subscriptions","organizations_url":"https://api.github.com/users/gajus/orgs","repos_url":"https://api.github.com/users/gajus/repos","events_url":"https://api.github.com/users/gajus/events{/privacy}","received_events_url":"https://api.github.com/users/gajus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-03T13:32:16Z","updated_at":"2016-06-13T16:19:04Z","closed_at":"2016-06-13T15:47:07Z","body":"With several module bundlers (webpack 2 and [rollup](http://rollupjs.org/)) now supporting tree shaking:\r\n\r\n> Tree shaking?\r\n> Normally if you require a module, you import the whole thing. ES2015 lets you just import the bits you need, without mucking around with custom builds. It's a revolution in how we use libraries in JavaScript, and it's happening right now.\r\n\r\nIt would be amazing if there was a turf build using [`import`](https://developer.mozilla.org/en/docs/web/javascript/reference/statements/import). This would drastically reduce the build size (which is now nearing ~500kb with just a handful of features being used)."},"comment":{"url":"https://api.github.com/repos/Turfjs/turf/issues/comments/225631541","html_url":"https://github.com/Turfjs/turf/issues/303#issuecomment-225631541","issue_url":"https://api.github.com/repos/Turfjs/turf/issues/303","id":225631541,"user":{"login":"tmcw","id":32314,"avatar_url":"https://avatars.githubusercontent.com/u/32314?v=3","gravatar_id":"","url":"https://api.github.com/users/tmcw","html_url":"https://github.com/tmcw","followers_url":"https://api.github.com/users/tmcw/followers","following_url":"https://api.github.com/users/tmcw/following{/other_user}","gists_url":"https://api.github.com/users/tmcw/gists{/gist_id}","starred_url":"https://api.github.com/users/tmcw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmcw/subscriptions","organizations_url":"https://api.github.com/users/tmcw/orgs","repos_url":"https://api.github.com/users/tmcw/repos","events_url":"https://api.github.com/users/tmcw/events{/privacy}","received_events_url":"https://api.github.com/users/tmcw/received_events","type":"User","site_admin":false},"created_at":"2016-06-13T16:19:04Z","updated_at":"2016-06-13T16:19:04Z","body":"Sorry - I'm trying to slim down Turf's issues to those that are actionable immediately. Right now we have quite a few issues that are very long-term and almost no core maintainer time (i led the vast majority of turf 3 solo), so focusing is a priority. Closing issues does not mean that it's deprioritizing the request or saying that nobody should do it: I want PRs to be the primary documentation of work rather than issues, and I explicitly will say that a PR is accepted if I close an issue.\r\n\r\nProblems here are:\r\n\r\n- [ES6 module support in Node.js is still very far away](https://medium.com/@nodesource/es-modules-and-node-js-hard-choices-2b6995e4d491#.tv0twa7ji) and no other JavaScript runtime - no browser - supports ES6 modules. This means that tests for es6-turf will require a transpilation step, always, which is a total bummer and a big change in our infrastructure's simplicity\r\n- Top-level es6 modules with lower-down commonjs doesn't really work; this is what I tried to do with simple-statistics and it turned out that if you really _want_ tree-shaking you need more than a top-level file.\r\n\r\nLodash is able to support ES6 modules mainly because it's a very... meta project. All of the lodash code is generated dynamically for every single build, and it's totally different than any other JavaScript project in the whole ecosystem. Going the lodash way would be awesome, but would be a massive change.\r\n\r\nSorry again that closing the issue seemed counterproductive: this is not a \"no for everyone\", it's me trying to define the scope given my estimation of the work's time requirement versus its benefit and other features, and keeping Turf's scope to a level that's accomplishable without further. severe burnout."}}
{"actor":{"display_login":"tmcw"}}