{"action":"created","issue":{"url":"https://api.github.com/repos/zurb/foundation-apps/issues/354","labels_url":"https://api.github.com/repos/zurb/foundation-apps/issues/354/labels{/name}","comments_url":"https://api.github.com/repos/zurb/foundation-apps/issues/354/comments","events_url":"https://api.github.com/repos/zurb/foundation-apps/issues/354/events","html_url":"https://github.com/zurb/foundation-apps/pull/354","id":52542276,"number":354,"title":"Make a gulp task to compile all templates and javascript into a single file","user":{"login":"MikaAK","id":4650931,"avatar_url":"https://avatars.githubusercontent.com/u/4650931?v=3","gravatar_id":"","url":"https://api.github.com/users/MikaAK","html_url":"https://github.com/MikaAK","followers_url":"https://api.github.com/users/MikaAK/followers","following_url":"https://api.github.com/users/MikaAK/following{/other_user}","gists_url":"https://api.github.com/users/MikaAK/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaAK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaAK/subscriptions","organizations_url":"https://api.github.com/users/MikaAK/orgs","repos_url":"https://api.github.com/users/MikaAK/repos","events_url":"https://api.github.com/users/MikaAK/events{/privacy}","received_events_url":"https://api.github.com/users/MikaAK/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-12-19T23:59:40Z","updated_at":"2015-02-16T18:42:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zurb/foundation-apps/pulls/354","html_url":"https://github.com/zurb/foundation-apps/pull/354","diff_url":"https://github.com/zurb/foundation-apps/pull/354.diff","patch_url":"https://github.com/zurb/foundation-apps/pull/354.patch"},"body":"The directives for foundation for apps should be useable outside of the entire framework. I've created a few gulp tasks to compile the directives and helping things to `/compile/foundation-tpls-min.js` and `/compile/foundation-tpls.js`. \r\n\r\nI've used [ngHtml2Js](https://www.npmjs.com/package/gulp-ng-html2js) for this. \r\n\r\n### Errors\r\nLine 39 `mediaQueries[key].replace` would fail because `mediaQueries` was not converted from a string to JSON properly. Instead it the key was the JSON string and the value was null.\r\n\r\n### My Fix \r\nI changed the code inside `js/angular/services/foundation.core.js`  in the `parseStyleToObject` function. I refactored the method instead of manually parsing the string to use the `JSON.parse` method. \r\n\r\n#### This fails in travis so I undid it\r\n\r\n## Things to watch for\r\nOddly sometimes the way it pulls out media queries from the meta element sometimes will fail. The `font-family` is converted to `'{\"small\": \"0\", \"medium\": \"40rem\", \"large\": \"75rem\", \"xlarge\": \"90rem\", \"xxlarge\": \"120rem\"}'` which is unreadable by the `parseStyleToObject` function. If you replace the function with `JSON.parse` it works but when font-family goes to being a query string `small=0&medium=40rem` it breaks."},"comment":{"url":"https://api.github.com/repos/zurb/foundation-apps/issues/comments/74554219","html_url":"https://github.com/zurb/foundation-apps/pull/354#issuecomment-74554219","issue_url":"https://api.github.com/repos/zurb/foundation-apps/issues/354","id":74554219,"user":{"login":"gakimball","id":1142001,"avatar_url":"https://avatars.githubusercontent.com/u/1142001?v=3","gravatar_id":"","url":"https://api.github.com/users/gakimball","html_url":"https://github.com/gakimball","followers_url":"https://api.github.com/users/gakimball/followers","following_url":"https://api.github.com/users/gakimball/following{/other_user}","gists_url":"https://api.github.com/users/gakimball/gists{/gist_id}","starred_url":"https://api.github.com/users/gakimball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gakimball/subscriptions","organizations_url":"https://api.github.com/users/gakimball/orgs","repos_url":"https://api.github.com/users/gakimball/repos","events_url":"https://api.github.com/users/gakimball/events{/privacy}","received_events_url":"https://api.github.com/users/gakimball/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T18:42:45Z","updated_at":"2015-02-16T18:42:45Z","body":"Awesome, thank you. You'll see that the new Gulpfile has a task called `deploy:dist`, which generates compiled assets for Bower and npm."}}