{"action":"created","issue":{"url":"https://api.github.com/repos/l20n/l20n.js/issues/99","labels_url":"https://api.github.com/repos/l20n/l20n.js/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/l20n/l20n.js/issues/99/comments","events_url":"https://api.github.com/repos/l20n/l20n.js/issues/99/events","html_url":"https://github.com/l20n/l20n.js/pull/99","id":114428713,"number":99,"title":"Bug 1220396 - Add browserify source transforms","user":{"login":"askmatey","id":812964,"avatar_url":"https://avatars.githubusercontent.com/u/812964?v=3","gravatar_id":"","url":"https://api.github.com/users/askmatey","html_url":"https://github.com/askmatey","followers_url":"https://api.github.com/users/askmatey/followers","following_url":"https://api.github.com/users/askmatey/following{/other_user}","gists_url":"https://api.github.com/users/askmatey/gists{/gist_id}","starred_url":"https://api.github.com/users/askmatey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/askmatey/subscriptions","organizations_url":"https://api.github.com/users/askmatey/orgs","repos_url":"https://api.github.com/users/askmatey/repos","events_url":"https://api.github.com/users/askmatey/events{/privacy}","received_events_url":"https://api.github.com/users/askmatey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-31T19:09:15Z","updated_at":"2015-10-31T19:17:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/l20n/l20n.js/pulls/99","html_url":"https://github.com/l20n/l20n.js/pull/99","diff_url":"https://github.com/l20n/l20n.js/pull/99.diff","patch_url":"https://github.com/l20n/l20n.js/pull/99.patch"},"body":"You can configure transforms to be automatically applied when a module is loaded in a package's `browserify.transform` field. \r\n\r\nSee: https://github.com/substack/node-browserify#browserifytransform\r\n\r\nExample usage (*via* `node_modules`):\r\n\r\n```js\r\nimport l20n from 'l20n/dist/bundle/web/l20n.js';\r\n\r\n// Bootstrap\r\nconst run = () => {\r\n  console.log('app bootet, continue...');\r\n};\r\n\r\nPromise.all([\r\n  ...\r\n  new Promise((resolve) => {\r\n    document.addEventListener('DOMContentLoaded', function onContentLoaded() {\r\n      document.removeEventListener('DOMContentLoaded', onContentLoaded);\r\n      document.l10n.ready.then(resolve);\r\n    });\r\n  })\r\n]).then(run);\r\n```\r\n\r\nError message\r\n```sh\r\nSyntaxError: let is a reserved identifier\r\n```\r\n\r\n----------\r\n\r\n:white_check_mark: Tested successfully with [browserify](https://github.com/substack/node-browserify) `11.2.0`."},"comment":{"url":"https://api.github.com/repos/l20n/l20n.js/issues/comments/152765027","html_url":"https://github.com/l20n/l20n.js/pull/99#issuecomment-152765027","issue_url":"https://api.github.com/repos/l20n/l20n.js/issues/99","id":152765027,"user":{"login":"askmatey","id":812964,"avatar_url":"https://avatars.githubusercontent.com/u/812964?v=3","gravatar_id":"","url":"https://api.github.com/users/askmatey","html_url":"https://github.com/askmatey","followers_url":"https://api.github.com/users/askmatey/followers","following_url":"https://api.github.com/users/askmatey/following{/other_user}","gists_url":"https://api.github.com/users/askmatey/gists{/gist_id}","starred_url":"https://api.github.com/users/askmatey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/askmatey/subscriptions","organizations_url":"https://api.github.com/users/askmatey/orgs","repos_url":"https://api.github.com/users/askmatey/repos","events_url":"https://api.github.com/users/askmatey/events{/privacy}","received_events_url":"https://api.github.com/users/askmatey/received_events","type":"User","site_admin":false},"created_at":"2015-10-31T19:17:08Z","updated_at":"2015-10-31T19:17:08Z","body":"https://bugzilla.mozilla.org/show_bug.cgi?id=1220396"}}