{"action":"created","issue":{"url":"https://api.github.com/repos/typestyle/typestyle/issues/69","repository_url":"https://api.github.com/repos/typestyle/typestyle","labels_url":"https://api.github.com/repos/typestyle/typestyle/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/typestyle/typestyle/issues/69/comments","events_url":"https://api.github.com/repos/typestyle/typestyle/issues/69/events","html_url":"https://github.com/typestyle/typestyle/issues/69","id":194849148,"number":69,"title":"Providing ES2015 builds","user":{"login":"TylorS","id":6282473,"avatar_url":"https://avatars.githubusercontent.com/u/6282473?v=3","gravatar_id":"","url":"https://api.github.com/users/TylorS","html_url":"https://github.com/TylorS","followers_url":"https://api.github.com/users/TylorS/followers","following_url":"https://api.github.com/users/TylorS/following{/other_user}","gists_url":"https://api.github.com/users/TylorS/gists{/gist_id}","starred_url":"https://api.github.com/users/TylorS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TylorS/subscriptions","organizations_url":"https://api.github.com/users/TylorS/orgs","repos_url":"https://api.github.com/users/TylorS/repos","events_url":"https://api.github.com/users/TylorS/events{/privacy}","received_events_url":"https://api.github.com/users/TylorS/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-11T19:03:06Z","updated_at":"2016-12-11T21:14:41Z","closed_at":null,"body":"Hello, first off thank you for the wonderful work here. I've been enjoying this library immensely. \r\n\r\nRecently I've been trying to update all of my dependencies to provide ES2015 builds and TypeStyle remains one of the last of them which are commonjs only.\r\n\r\nI'd love to create a PR, but didn't want to do so without getting feedback on if it would be accepted. Typically I've created 2 separate tsconfigs, `tsconfig-es2015.json` and the \"standard\" `tsconfig.json` looking something like these\r\n\r\n```typescript\r\n// tsconfig.json\r\n{\r\n  \"compilerOptions\": {\r\n    ...,\r\n    \"module\": \"commonjs\",\r\n    \"target\": \"es5\",\r\n    \"outDir\": \"lib/commonjs\"\r\n  },\r\n}\r\n\r\n// tsconfig-es2015.json\r\n{\r\n  \"compilerOptions\": {\r\n    ...,\r\n    \"module\": \"es2015\",\r\n    \"target\": \"es5\",\r\n    \"outDir\": \"lib/es2015\"\r\n  },\r\n}\r\n```\r\n\r\nThen in the libraries `package.json` changing or adding the following fields\r\n\r\n```typescript\r\n{\r\n  \"main\": \"lib/commonjs/index.js\",\r\n  \"module\": \"lib/es2015/index.js\",\r\n  \"jsnext:main\": \"lib/es2015/index.js\",\r\n  \"typings\": \"lib/es2015/index.d.ts\" // could just as well be lib/commonjs/index.d.ts\r\n}\r\n```\r\n\r\nThanks for your time!"},"comment":{"url":"https://api.github.com/repos/typestyle/typestyle/issues/comments/266308380","html_url":"https://github.com/typestyle/typestyle/issues/69#issuecomment-266308380","issue_url":"https://api.github.com/repos/typestyle/typestyle/issues/69","id":266308380,"user":{"login":"basarat","id":874898,"avatar_url":"https://avatars.githubusercontent.com/u/874898?v=3","gravatar_id":"","url":"https://api.github.com/users/basarat","html_url":"https://github.com/basarat","followers_url":"https://api.github.com/users/basarat/followers","following_url":"https://api.github.com/users/basarat/following{/other_user}","gists_url":"https://api.github.com/users/basarat/gists{/gist_id}","starred_url":"https://api.github.com/users/basarat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basarat/subscriptions","organizations_url":"https://api.github.com/users/basarat/orgs","repos_url":"https://api.github.com/users/basarat/repos","events_url":"https://api.github.com/users/basarat/events{/privacy}","received_events_url":"https://api.github.com/users/basarat/received_events","type":"User","site_admin":false},"created_at":"2016-12-11T21:14:41Z","updated_at":"2016-12-11T21:14:41Z","body":"> Hello, first off thank you for the wonderful work here. I've been enjoying this library immensely.\r\n\r\nThank *you* :rose: :heart:\r\n\r\n> TypeStyle remains one of the last of them which are commonjs only.\r\n\r\nI doubt this to be the case, e.g. you must be depending upon something like vue or react or angular and they would be providing es5 only builds. Perhaps I am out of date and would love to be told that I am wrong :heart:\r\n\r\nMy only concern is that it makes path based imports harder `import {something} from \"typestyle/lib/es2015/something\"` :rose:"}}
{"actor":{"display_login":"basarat"}}