{"action":"created","issue":{"url":"https://api.github.com/repos/optimizely/marketing-website/issues/779","labels_url":"https://api.github.com/repos/optimizely/marketing-website/issues/779/labels{/name}","comments_url":"https://api.github.com/repos/optimizely/marketing-website/issues/779/comments","events_url":"https://api.github.com/repos/optimizely/marketing-website/issues/779/events","html_url":"https://github.com/optimizely/marketing-website/pull/779","id":54002377,"number":779,"title":"add webpack","user":{"login":"dtothefp","id":4656726,"avatar_url":"https://avatars.githubusercontent.com/u/4656726?v=3","gravatar_id":"","url":"https://api.github.com/users/dtothefp","html_url":"https://github.com/dtothefp","followers_url":"https://api.github.com/users/dtothefp/followers","following_url":"https://api.github.com/users/dtothefp/following{/other_user}","gists_url":"https://api.github.com/users/dtothefp/gists{/gist_id}","starred_url":"https://api.github.com/users/dtothefp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtothefp/subscriptions","organizations_url":"https://api.github.com/users/dtothefp/orgs","repos_url":"https://api.github.com/users/dtothefp/repos","events_url":"https://api.github.com/users/dtothefp/events{/privacy}","received_events_url":"https://api.github.com/users/dtothefp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/optimizely/marketing-website/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/optimizely/marketing-website/labels/in+progress","name":"in progress","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-11T19:48:36Z","updated_at":"2015-01-14T02:50:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/optimizely/marketing-website/pulls/779","html_url":"https://github.com/optimizely/marketing-website/pull/779","diff_url":"https://github.com/optimizely/marketing-website/pull/779.diff","patch_url":"https://github.com/optimizely/marketing-website/pull/779.patch"},"body":"This PR addresses adding webpack module loader into the marketing repo.  I know this implementation isn't a very \"webpack\" way, but I'm first trying to mimic our build behavior that was happening with the `concat` task to get everything working, and then go back and refactor. \r\n\r\nIssues:\r\n- How to invoke sourcemaps in `grunt-webpack`\r\n- How to create a `production` flag in `grunt-webpack` in order to specify files to be uglified by webpack.\r\n- Bundling vendor files into one file and making their globals available outside of the bundle.  Currently, I'm accomplishing this through the `script-loader`, which seems to concat all files into a string and call `eval` on it.\r\n- Mimicking `concat` behavior for the `namespacePages` target https://github.com/optimizely/marketing-website/blob/master/grunt/concat.js. i.e. separate bundles will be created for `page` and `layout` level JS and they will be output to `dist/assets/js` directory in the appropriate directory structure `layout/*.js` or `page/*.js`.  I think this can be accomplished by something similar to http://stackoverflow.com/questions/22078420/grunt-webpack-wildcard-on-entry/22715972#22715972, in combination with some sort of function that parses whether it is a page or layout and appends the correct directory structure.\r\n- Currently `concat` is creating a banner and footer around JS bundles for catching errors in staging/production and creating a closure with the `window.optly.mrkt` global defined. May need to build a webpack loader that implements this functionality, or just continue to use concat.\r\n- Potentially separate our global js i.e. global/utils/components from vendor JS.  Currently, jQuery and Modernizr are being bundled together and loaded in the head, and all other vendor packages are bundled with global/utils/components creating `bundle.js`. Potentially load only Modernizr in the head, and bundle vendor and global separately and load in the body, followed by page/layout JS.\r\n"},"comment":{"url":"https://api.github.com/repos/optimizely/marketing-website/issues/comments/69861359","html_url":"https://github.com/optimizely/marketing-website/pull/779#issuecomment-69861359","issue_url":"https://api.github.com/repos/optimizely/marketing-website/issues/779","id":69861359,"user":{"login":"optibot","id":1276102,"avatar_url":"https://avatars.githubusercontent.com/u/1276102?v=3","gravatar_id":"","url":"https://api.github.com/users/optibot","html_url":"https://github.com/optibot","followers_url":"https://api.github.com/users/optibot/followers","following_url":"https://api.github.com/users/optibot/following{/other_user}","gists_url":"https://api.github.com/users/optibot/gists{/gist_id}","starred_url":"https://api.github.com/users/optibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/optibot/subscriptions","organizations_url":"https://api.github.com/users/optibot/orgs","repos_url":"https://api.github.com/users/optibot/repos","events_url":"https://api.github.com/users/optibot/events{/privacy}","received_events_url":"https://api.github.com/users/optibot/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T02:50:38Z","updated_at":"2015-01-14T02:50:38Z","body":"Test PASSed.\nRefer to this link for build results (access rights to CI server needed): \nhttps://jenkins.dz.optimizely.com/job/marketing-staging_prs/1169/\nTest PASSed."}}