{"action":"opened","issue":{"url":"https://api.github.com/repos/mozilla/blok/issues/45","repository_url":"https://api.github.com/repos/mozilla/blok","labels_url":"https://api.github.com/repos/mozilla/blok/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/blok/issues/45/comments","events_url":"https://api.github.com/repos/mozilla/blok/issues/45/events","html_url":"https://github.com/mozilla/blok/issues/45","id":167536441,"number":45,"title":"Install Foundation instead of including in repo","user":{"login":"pdehaan","id":557895,"avatar_url":"https://avatars.githubusercontent.com/u/557895?v=3","gravatar_id":"","url":"https://api.github.com/users/pdehaan","html_url":"https://github.com/pdehaan","followers_url":"https://api.github.com/users/pdehaan/followers","following_url":"https://api.github.com/users/pdehaan/following{/other_user}","gists_url":"https://api.github.com/users/pdehaan/gists{/gist_id}","starred_url":"https://api.github.com/users/pdehaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdehaan/subscriptions","organizations_url":"https://api.github.com/users/pdehaan/orgs","repos_url":"https://api.github.com/users/pdehaan/repos","events_url":"https://api.github.com/users/pdehaan/events{/privacy}","received_events_url":"https://api.github.com/users/pdehaan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-26T07:14:12Z","updated_at":"2016-07-26T07:14:12Z","closed_at":null,"body":"Per https://github.com/mozilla/blok/pull/33#discussion_r71975541\r\n\r\nCurrently we're including 3rd party Foundation CSS code in the repo (see [/css/foundation.min.css](https://github.com/mozilla/blok/blob/567eef8b2a1471aa62bc590788578651775eda42/css/foundation.min.css)).\r\n\r\nIt'd be nice if we included this via something like Bower or Node as a dependency.\r\n\r\nClosest I can guess, we could do something like:\r\n\r\n```sh\r\n$ npm i foundation-sites -D\r\n```\r\n\r\nThen add a package.json `postinstall` hook to copy the file into /css/:\r\n\r\n```js\r\n\"postinstall\": \"cp ./node_modules/foundation-sites/dist/foundation.min.css css/foundation.min.css\",\r\n```\r\n\r\nOr, we could write some Node script to copy the file, but that seems a bit more verbose (although probably a bit more cross-platform friendly):\r\n\r\n```js\r\nconst fs = require('fs')\r\nconst path = require('path')\r\n\r\nconst cssPath = require.resolve('foundation-sites/dist/foundation.min.css')\r\nconst cssDest = path.join(__dirname, '..', 'css', 'foundation.min.css')\r\n\r\nfs.createReadStream(cssPath).pipe(fs.createWriteStream(cssDest))\r\n```\r\n\r\n"}}
{"actor":{"display_login":"pdehaan"}}