{"action":"created","issue":{"url":"https://api.github.com/repos/sass/sass/issues/1692","labels_url":"https://api.github.com/repos/sass/sass/issues/1692/labels{/name}","comments_url":"https://api.github.com/repos/sass/sass/issues/1692/comments","events_url":"https://api.github.com/repos/sass/sass/issues/1692/events","html_url":"https://github.com/sass/sass/issues/1692","id":67212617,"number":1692,"title":"Passing variables from the command line or programmatically","user":{"login":"milesj","id":143744,"avatar_url":"https://avatars.githubusercontent.com/u/143744?v=3","gravatar_id":"","url":"https://api.github.com/users/milesj","html_url":"https://github.com/milesj","followers_url":"https://api.github.com/users/milesj/followers","following_url":"https://api.github.com/users/milesj/following{/other_user}","gists_url":"https://api.github.com/users/milesj/gists{/gist_id}","starred_url":"https://api.github.com/users/milesj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milesj/subscriptions","organizations_url":"https://api.github.com/users/milesj/orgs","repos_url":"https://api.github.com/users/milesj/repos","events_url":"https://api.github.com/users/milesj/events{/privacy}","received_events_url":"https://api.github.com/users/milesj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-08T20:25:59Z","updated_at":"2015-04-21T06:01:30Z","closed_at":"2015-04-21T03:46:16Z","body":"I maintain a project that compiles two types of Sass outputs, a LTR (default) and a RTL version. Currently the process is rather lengthy, as I have to compile the LTR first, then edit the Sass files and modify specific variables to enable RTL, then compile RTL, and then reverse all the Sass modifications.\r\n\r\nIt would be really awesome if we could pass Sass variables from the command line and make them globally available, something like:\r\n\r\n```\r\nsass --variable=\"rtl=1\" toolkit.scss toolkit.css\r\n```\r\n\r\nOr if that's too... janky, perhaps support for it programmatically? (Ignore my Ruby as I don't know it).\r\n\r\n```ruby\r\nrender = Sass::Engine.new(File.read(original_file_name), {\r\n  cache: true,\r\n  syntax: :sass,\r\n  style: :compressed,\r\n  variables: {\r\n    rtl: true\r\n  }\r\n}).render\r\nFile.write(output_file_name, render)\r\n```"},"comment":{"url":"https://api.github.com/repos/sass/sass/issues/comments/94649175","html_url":"https://github.com/sass/sass/issues/1692#issuecomment-94649175","issue_url":"https://api.github.com/repos/sass/sass/issues/1692","id":94649175,"user":{"login":"milesj","id":143744,"avatar_url":"https://avatars.githubusercontent.com/u/143744?v=3","gravatar_id":"","url":"https://api.github.com/users/milesj","html_url":"https://github.com/milesj","followers_url":"https://api.github.com/users/milesj/followers","following_url":"https://api.github.com/users/milesj/following{/other_user}","gists_url":"https://api.github.com/users/milesj/gists{/gist_id}","starred_url":"https://api.github.com/users/milesj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milesj/subscriptions","organizations_url":"https://api.github.com/users/milesj/orgs","repos_url":"https://api.github.com/users/milesj/repos","events_url":"https://api.github.com/users/milesj/events{/privacy}","received_events_url":"https://api.github.com/users/milesj/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T06:01:30Z","updated_at":"2015-04-21T06:01:30Z","body":"Thanks for the response. Do you have an example of this in action?"}}