{"action":"created","issue":{"url":"https://api.github.com/repos/docpad/docpad-plugin-less/issues/12","labels_url":"https://api.github.com/repos/docpad/docpad-plugin-less/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/docpad/docpad-plugin-less/issues/12/comments","events_url":"https://api.github.com/repos/docpad/docpad-plugin-less/issues/12/events","html_url":"https://github.com/docpad/docpad-plugin-less/pull/12","id":29112764,"number":12,"title":"Remove referencesOthers toggle","user":{"login":"RobLoach","id":25086,"avatar_url":"https://avatars.githubusercontent.com/u/25086?v=3","gravatar_id":"","url":"https://api.github.com/users/RobLoach","html_url":"https://github.com/RobLoach","followers_url":"https://api.github.com/users/RobLoach/followers","following_url":"https://api.github.com/users/RobLoach/following{/other_user}","gists_url":"https://api.github.com/users/RobLoach/gists{/gist_id}","starred_url":"https://api.github.com/users/RobLoach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobLoach/subscriptions","organizations_url":"https://api.github.com/users/RobLoach/orgs","repos_url":"https://api.github.com/users/RobLoach/repos","events_url":"https://api.github.com/users/RobLoach/events{/privacy}","received_events_url":"https://api.github.com/users/RobLoach/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-03-10T17:03:57Z","updated_at":"2015-02-19T07:01:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docpad/docpad-plugin-less/pulls/12","html_url":"https://github.com/docpad/docpad-plugin-less/pull/12","diff_url":"https://github.com/docpad/docpad-plugin-less/pull/12.diff","patch_url":"https://github.com/docpad/docpad-plugin-less/pull/12.patch"},"body":"The [referenceOthers](https://github.com/docpad/docpad-plugin-less/blob/master/src/less.plugin.coffee#L36) toggle is as follows:\r\n``` coffeescript\r\n# Add Reference Others if this document does\r\n# As lesscss concats imports\r\nfile.setMetaDefaults('referencesOthers': true)  if opts.content.indexOf('@import') isnt -1\r\n```\r\n\r\nThis tells DocPad to rebuild all documents if `@import` is anywhere in the document. There are two cases of using a `@import` in a LESS file:\r\n\r\n1. Importing a LESS file. This will make LESS concatinate and re-build the LESS file for us.\r\n2. Importing a CSS file. LESS will ignore concatenation and just leave the CSS as a CSS import.\r\n\r\nIn either case, it seems like LESS will do the work for us, DocPad does not have to rebuild anything else. We don't need the referencesOthers toggle at all, since LESS does the rebuilding for us. I suggest we remove it, and just default to referencesOthers false. LESS handles importing/building LESS files for us."},"comment":{"url":"https://api.github.com/repos/docpad/docpad-plugin-less/issues/comments/75007113","html_url":"https://github.com/docpad/docpad-plugin-less/pull/12#issuecomment-75007113","issue_url":"https://api.github.com/repos/docpad/docpad-plugin-less/issues/12","id":75007113,"user":{"login":"balupton","id":61148,"avatar_url":"https://avatars.githubusercontent.com/u/61148?v=3","gravatar_id":"","url":"https://api.github.com/users/balupton","html_url":"https://github.com/balupton","followers_url":"https://api.github.com/users/balupton/followers","following_url":"https://api.github.com/users/balupton/following{/other_user}","gists_url":"https://api.github.com/users/balupton/gists{/gist_id}","starred_url":"https://api.github.com/users/balupton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balupton/subscriptions","organizations_url":"https://api.github.com/users/balupton/orgs","repos_url":"https://api.github.com/users/balupton/repos","events_url":"https://api.github.com/users/balupton/events{/privacy}","received_events_url":"https://api.github.com/users/balupton/received_events","type":"User","site_admin":false},"created_at":"2015-02-19T07:01:27Z","updated_at":"2015-02-19T07:01:27Z","body":"The issue here is the other way round.\r\n\r\nIf I modify `_blah.css.less` I'd expect DocPad to re-render `include-blah.css.less`.\r\n\r\nSo far the only way we can do this, is the dumb way of setting `include-blah.css.less` as `referencesOthers: true`.\r\n\r\nIdeally, we'd be a lot smarter about this, and know that `include-blah.css.less` only includes `_blah.css.less` so when `_blah.css.less` is changed, we only re-render `_blah.css.less`"}}