{"action":"created","issue":{"url":"https://api.github.com/repos/CSSSR/csssr-project-template/issues/161","repository_url":"https://api.github.com/repos/CSSSR/csssr-project-template","labels_url":"https://api.github.com/repos/CSSSR/csssr-project-template/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/CSSSR/csssr-project-template/issues/161/comments","events_url":"https://api.github.com/repos/CSSSR/csssr-project-template/issues/161/events","html_url":"https://github.com/CSSSR/csssr-project-template/issues/161","id":178131073,"number":161,"title":"исключения в скриптах для дев режима","user":{"login":"jt3k","id":1261240,"avatar_url":"https://avatars.githubusercontent.com/u/1261240?v=3","gravatar_id":"","url":"https://api.github.com/users/jt3k","html_url":"https://github.com/jt3k","followers_url":"https://api.github.com/users/jt3k/followers","following_url":"https://api.github.com/users/jt3k/following{/other_user}","gists_url":"https://api.github.com/users/jt3k/gists{/gist_id}","starred_url":"https://api.github.com/users/jt3k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jt3k/subscriptions","organizations_url":"https://api.github.com/users/jt3k/orgs","repos_url":"https://api.github.com/users/jt3k/repos","events_url":"https://api.github.com/users/jt3k/events{/privacy}","received_events_url":"https://api.github.com/users/jt3k/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-20T17:59:46Z","updated_at":"2016-09-21T11:57:47Z","closed_at":null,"body":"Научите пользоваться этим. Я пару раз пробовал самостоятельно научиться но всё тщетно.\r\n\r\nИмеется в виду переменная `__DEV__`  в конструкциях типа этой:\r\n```js\r\nif (__DEV__) {\r\n  window.alert('blablabla');\r\n}\r\n```\r\n..Который  потом вырежется  после компиляции в production-режиме.\r\n\r\nИнтересуют  также такие переменные внутри в jade и stylus"},"comment":{"url":"https://api.github.com/repos/CSSSR/csssr-project-template/issues/comments/248590047","html_url":"https://github.com/CSSSR/csssr-project-template/issues/161#issuecomment-248590047","issue_url":"https://api.github.com/repos/CSSSR/csssr-project-template/issues/161","id":248590047,"user":{"login":"jt3k","id":1261240,"avatar_url":"https://avatars.githubusercontent.com/u/1261240?v=3","gravatar_id":"","url":"https://api.github.com/users/jt3k","html_url":"https://github.com/jt3k","followers_url":"https://api.github.com/users/jt3k/followers","following_url":"https://api.github.com/users/jt3k/following{/other_user}","gists_url":"https://api.github.com/users/jt3k/gists{/gist_id}","starred_url":"https://api.github.com/users/jt3k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jt3k/subscriptions","organizations_url":"https://api.github.com/users/jt3k/orgs","repos_url":"https://api.github.com/users/jt3k/repos","events_url":"https://api.github.com/users/jt3k/events{/privacy}","received_events_url":"https://api.github.com/users/jt3k/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T11:57:47Z","updated_at":"2016-09-21T11:57:47Z","body":"всо ок. разобрался.\r\nwebpack.config.js\r\n```js\r\n...\r\n\t\t\tnew webpack.DefinePlugin({\r\n\t\t\t\t// признак дев-режима для юзания в скриптах\r\n\t\t\t\t__DEV__: JSON.stringify(process.env.NODE_ENV !== 'production')\r\n\t\t\t})\r\n...\r\n```\r\n\r\ntasks/templates.js\r\n```js\r\nconst data = {\r\n...\r\n\t// признак дев-режима для юзания в jade-файлах\r\n\t__DEV__: process.env.NODE_ENV !== 'production'\r\n};\r\n```\r\n\r\ntasks/styles.js\r\n```js\r\n\t\t.pipe(stylus({\r\n...\r\n\t\t\tdefine: {\r\n\t\t\t\t// признак дев-режима для юзания в styl-файлах\r\n\t\t\t\t'__DEV__': process.env.NODE_ENV !== 'production'\r\n\t\t\t}\r\n\t\t})\r\n...\r\n```"}}
{"actor":{"display_login":"jt3k"}}