{"action":"created","issue":{"url":"https://api.github.com/repos/martndemus/ember-cli-font-awesome/issues/73","repository_url":"https://api.github.com/repos/martndemus/ember-cli-font-awesome","labels_url":"https://api.github.com/repos/martndemus/ember-cli-font-awesome/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/martndemus/ember-cli-font-awesome/issues/73/comments","events_url":"https://api.github.com/repos/martndemus/ember-cli-font-awesome/issues/73/events","html_url":"https://github.com/martndemus/ember-cli-font-awesome/pull/73","id":138222134,"number":73,"title":"Several index.js changes/improvements","user":{"login":"Panman8201","id":3475765,"avatar_url":"https://avatars.githubusercontent.com/u/3475765?v=3","gravatar_id":"","url":"https://api.github.com/users/Panman8201","html_url":"https://github.com/Panman8201","followers_url":"https://api.github.com/users/Panman8201/followers","following_url":"https://api.github.com/users/Panman8201/following{/other_user}","gists_url":"https://api.github.com/users/Panman8201/gists{/gist_id}","starred_url":"https://api.github.com/users/Panman8201/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Panman8201/subscriptions","organizations_url":"https://api.github.com/users/Panman8201/orgs","repos_url":"https://api.github.com/users/Panman8201/repos","events_url":"https://api.github.com/users/Panman8201/events{/privacy}","received_events_url":"https://api.github.com/users/Panman8201/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-03T16:13:35Z","updated_at":"2016-03-04T07:31:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/martndemus/ember-cli-font-awesome/pulls/73","html_url":"https://github.com/martndemus/ember-cli-font-awesome/pull/73","diff_url":"https://github.com/martndemus/ember-cli-font-awesome/pull/73.diff","patch_url":"https://github.com/martndemus/ember-cli-font-awesome/pull/73.patch"},"body":"While exploring issue #72, I've made _several_ changes/commits to `index.js` to improve many aspects. Here is a list of the commits with descriptions that should explain everything (I feel like I wrote a noval...);\r\n\r\n**Remove importing *.scss files into styles tree (entire treeForStyles hook)**\r\nThis should not be needed since users `@import` from within their `app.scss`. And since the README informs the user to import from the Bower directory, nothing really needs to be done by this addon to enable Sass support (user would just install the Sass addon and go from there).\r\n\r\n**Add code comment about Babel decorators w/ link**\r\nAdded a couple comments to explain what is going on here, along with a link to the decorator addon showing this usage. And changed some code alignment things to improve visualization.\r\n\r\n**Slight change to included _super call**\r\nMade a slight change to the _super call for the included hook (per Stefan Penner’s comment). Also added a couple links explaining/showing the usage of this nested addon stuff.\r\n\r\n**Use nodes path.join() to create paths**\r\nUse nodes `path.join()` to create paths used for importing. That way there is no need to worry about extra or proper usage of slashes. And by creating path variables, it ensures the same path is used multiple times. Along with improving  code visualization.\r\n\r\n**Add a friendly check for the font-awesome bower path**\r\nI use this in a couple of my addons to insure the required Bower packages are installed. Simply checks the file system for the font-awesome path. If not available, a friendly error message is presented informing the user how to fix the problem. The `target.import()` later on would have failed anyway, so this is just an up-front check.\r\n\r\n**Structure changes for the 'includeFontAwesomeAssets' option**\r\nRather than generating the `includeFontAwesomeAssets` option, and wrapping the `import()` stuff in an `if`, just look for the proper “exclude” criteria and `return` early (before any imports are performed). Also added documentation to the README about this option, not mentioned anywhere else.\r\n\r\n**Target the proper css file depending on environment**\r\nSince the font-awesome Bower package comes with both a minified and non-minified CSS file, import the proper one depending on what the build environment is.\r\n\r\n**Add an 'includeFontFiles' option**\r\nIn spirit of the ‘includeFontAwesomeAssets’ option, add an additional option that targets just the font files. Also made note of this new option in the README.\r\n\r\n**Import font files dynamically based on file system**\r\nInstead of maintaining a static list of font files, use the nodes file system to dynamically get a list of _all_ files in the fonts folder. I consider this somewhat of future-proofing the addon, in case those files ever change.\r\n\r\n**Adjust ember-cli-sass options to include font-awesome path**\r\nWhen the `useScss` option is enabled, adjust the `ember-cli-sass` options to include the font-awesome path. That way the user can `@import \"font-awesome\";` instead of needing to include the bower path. Also make sure this addon is ran before the `ember-cli-sass` addon, so our option changes take effect. The README is also updated to better explain Sass support and show this new usage.\r\n\r\n**Adjust ember-cli-less options to include font-awesome path**\r\nSimilar to the Sass support, when the `useLess` option is enabled, adjust the `ember-cli-less` options to include the font-awesome path. That way the user can just `@import \"font-awesome\";` in `app.less`. Also make sure this addon is ran before the `ember-cli-less` addon, so our option changes take effect. The README is also updated to add this new option and explain its usage.\r\n\r\nNote: This fixes #72"},"comment":{"url":"https://api.github.com/repos/martndemus/ember-cli-font-awesome/issues/comments/192160615","html_url":"https://github.com/martndemus/ember-cli-font-awesome/pull/73#issuecomment-192160615","issue_url":"https://api.github.com/repos/martndemus/ember-cli-font-awesome/issues/73","id":192160615,"user":{"login":"homu","id":10212162,"avatar_url":"https://avatars.githubusercontent.com/u/10212162?v=3","gravatar_id":"","url":"https://api.github.com/users/homu","html_url":"https://github.com/homu","followers_url":"https://api.github.com/users/homu/followers","following_url":"https://api.github.com/users/homu/following{/other_user}","gists_url":"https://api.github.com/users/homu/gists{/gist_id}","starred_url":"https://api.github.com/users/homu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/homu/subscriptions","organizations_url":"https://api.github.com/users/homu/orgs","repos_url":"https://api.github.com/users/homu/repos","events_url":"https://api.github.com/users/homu/events{/privacy}","received_events_url":"https://api.github.com/users/homu/received_events","type":"User","site_admin":false},"created_at":"2016-03-04T07:31:17Z","updated_at":"2016-03-04T07:31:17Z","body":":pushpin: Commit ab97ed4 has been approved by `martndemus`\n\n<!-- @homu r=martndemus ab97ed483578fd8d5781a076001763cf690a308d -->"}}