{"action":"created","issue":{"url":"https://api.github.com/repos/sass-eyeglass/eyeglass/issues/93","labels_url":"https://api.github.com/repos/sass-eyeglass/eyeglass/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/sass-eyeglass/eyeglass/issues/93/comments","events_url":"https://api.github.com/repos/sass-eyeglass/eyeglass/issues/93/events","html_url":"https://github.com/sass-eyeglass/eyeglass/issues/93","id":117946470,"number":93,"title":"Deprecate redundant capabilities","user":{"login":"chriseppstein","id":1839,"avatar_url":"https://avatars.githubusercontent.com/u/1839?v=3","gravatar_id":"","url":"https://api.github.com/users/chriseppstein","html_url":"https://github.com/chriseppstein","followers_url":"https://api.github.com/users/chriseppstein/followers","following_url":"https://api.github.com/users/chriseppstein/following{/other_user}","gists_url":"https://api.github.com/users/chriseppstein/gists{/gist_id}","starred_url":"https://api.github.com/users/chriseppstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriseppstein/subscriptions","organizations_url":"https://api.github.com/users/chriseppstein/orgs","repos_url":"https://api.github.com/users/chriseppstein/repos","events_url":"https://api.github.com/users/chriseppstein/events{/privacy}","received_events_url":"https://api.github.com/users/chriseppstein/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-20T01:27:10Z","updated_at":"2016-01-08T19:30:21Z","closed_at":"2016-01-08T19:30:21Z","body":"This is a general planning issue for simplifying our API for the 1.0 release. I'll make new issues for things that we decide here.\r\n\r\n# `sassDir`\r\n\r\nCurrently, we allow `sassDir` to be specified in `package.json` as well as in `eyeglass-exports.js`.\r\n\r\nThe `package.json` approach is much more user friendly. However, the `eyeglass-exports.js` approach\r\nallows the module to inspect the eyeglass options before deciding on the Sass directory. There is\r\nsome interesting things this enables, like letting people opt into a new version of a module's\r\nstylesheets by setting some option. But this is unlikely to be useful very often and there's\r\nprobably a simpler way to accomplish that use case.\r\n\r\n# `eyeglass-exports.js` location\r\n\r\nCurrently you can specify the eyeglass-exports file three ways in `package.json`:\r\n`pkg.main`, `pkg.eyeglass`, and `pkg.eyeglass.exports`. Given that we basically require a\r\n`pkg.eyeglass.needs` attribute at the very least, the `pkg.eyeglass` seems useless.\r\n\r\nI think the `pkg.main` form has some usefulness for pure eyeglass modules.\r\n\r\n# revisit `require('eyeglass')` exports\r\n\r\nThis currently exports a class and a decorator function.\r\n\r\n```js\r\n// class function\r\nvar Eyeglass = require('eyeglass').Eyeglass;\r\n// decorator function\r\nvar eyeglass = require('eyeglass').decorate;\r\n```\r\n\r\nWe can collapse this into\r\na single function that behaves differently depending on whether it is called with `new`.\r\n\r\n```js\r\n// returns an eyeglass instance\r\nvar Eyeglass = require('eyeglass');\r\nvar eyeglass = new Eyeglass({});\r\n// returns options\r\nvar eyeglass = require('eyeglass');\r\nvar sassOptions = eyeglass({});\r\n```\r\n\r\nI'm not sure I'm a fan of this approach. Alternatively we can leave decorate as a function\r\nattached to the exported function. \r\n\r\n```js\r\n// returns an eyeglass instance\r\nvar Eyeglass = require('eyeglass');\r\nvar eyeglass = new Eyeglass({});\r\n// returns options\r\nvar sassOptions = Eyeglass.decorate({});\r\n```\r\n\r\n# What else?\r\n\r\nIf there are other redundant configuration or APIs, please mention them."},"comment":{"url":"https://api.github.com/repos/sass-eyeglass/eyeglass/issues/comments/170100439","html_url":"https://github.com/sass-eyeglass/eyeglass/issues/93#issuecomment-170100439","issue_url":"https://api.github.com/repos/sass-eyeglass/eyeglass/issues/93","id":170100439,"user":{"login":"chriseppstein","id":1839,"avatar_url":"https://avatars.githubusercontent.com/u/1839?v=3","gravatar_id":"","url":"https://api.github.com/users/chriseppstein","html_url":"https://github.com/chriseppstein","followers_url":"https://api.github.com/users/chriseppstein/followers","following_url":"https://api.github.com/users/chriseppstein/following{/other_user}","gists_url":"https://api.github.com/users/chriseppstein/gists{/gist_id}","starred_url":"https://api.github.com/users/chriseppstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriseppstein/subscriptions","organizations_url":"https://api.github.com/users/chriseppstein/orgs","repos_url":"https://api.github.com/users/chriseppstein/repos","events_url":"https://api.github.com/users/chriseppstein/events{/privacy}","received_events_url":"https://api.github.com/users/chriseppstein/received_events","type":"User","site_admin":false},"created_at":"2016-01-08T19:30:21Z","updated_at":"2016-01-08T19:30:21Z","body":"We did a good job on these. I'm closing this. We can track other refactorings individually."}}