{"action":"opened","issue":{"url":"https://api.github.com/repos/johnpapa/generator-hottowel/issues/218","repository_url":"https://api.github.com/repos/johnpapa/generator-hottowel","labels_url":"https://api.github.com/repos/johnpapa/generator-hottowel/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/johnpapa/generator-hottowel/issues/218/comments","events_url":"https://api.github.com/repos/johnpapa/generator-hottowel/issues/218/events","html_url":"https://github.com/johnpapa/generator-hottowel/issues/218","id":315717435,"number":218,"title":"Less Changes reloads the website","user":{"login":"dashawk","id":1437205,"avatar_url":"https://avatars0.githubusercontent.com/u/1437205?v=4","gravatar_id":"","url":"https://api.github.com/users/dashawk","html_url":"https://github.com/dashawk","followers_url":"https://api.github.com/users/dashawk/followers","following_url":"https://api.github.com/users/dashawk/following{/other_user}","gists_url":"https://api.github.com/users/dashawk/gists{/gist_id}","starred_url":"https://api.github.com/users/dashawk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dashawk/subscriptions","organizations_url":"https://api.github.com/users/dashawk/orgs","repos_url":"https://api.github.com/users/dashawk/repos","events_url":"https://api.github.com/users/dashawk/events{/privacy}","received_events_url":"https://api.github.com/users/dashawk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-19T03:43:40Z","updated_at":"2018-04-19T03:43:40Z","closed_at":null,"author_association":"NONE","body":"### Issue details\r\nEvery time there is a change in any of the `less` files, the browser reloads but the changes made from the `less` file did not reflect on the website.\r\n\r\n### Steps to reproduce/test case\r\n\r\nHere is my `gulp task`\r\n\r\n```javascript\r\n// Here is the modified styles task\r\ngulp.task('styles', function () {\r\n\tvar bundle = gulp\r\n\t\t.src(config.client + 'app/themes/' + THEME_NAME + '/less/styles.less')\r\n\t\t.pipe($.plumber())\r\n\t\t.pipe($.less())\r\n\t\t.pipe($.autoprefixer({\r\n\t\t\tbrowsers: ['last 2 versions', '> 5%']\r\n\t\t}))\r\n\t\t.pipe($.concat('themeStyles.tmp'));\r\n\r\n\tvar globalStyle = gulp\r\n\t\t.src(config.less)\r\n\t\t.pipe($.plumber())\r\n\t\t.pipe($.less())\r\n\t\t.pipe($.autoprefixer({\r\n\t\t\tbrowsers: ['last 2 versions', '> 5%']\r\n\t\t}))\r\n\t\t.pipe($.concat('globalStyles.tmp'));\r\n\r\n\tvar stream = merge(bundle, globalStyle)\r\n\t\t.pipe($.concat('styles.css'))\r\n\t\t.pipe(gulp.dest(config.temp));\r\n\r\n\treturn stream;\r\n});\r\n\r\n// Here is the modified less-watcher\r\ngulp.task('less-watcher', function () {\r\n\tgulp.watch([\r\n\t\tconfig.client + 'app/themes' + THEME_NAME + '/less/**/*.*',\r\n\t\tconfig.less\r\n\t], ['styles']);\r\n});\r\n\r\n// Here is the modified startBrowserSync function\r\nfunction startBrowserSync(isDev, specRunner) {\r\n\tif (args.nosync || browserSync.active) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tlog('Starting BrowserSync on port ' + port);\r\n\r\n\t// If build: watches the files, builds, and restarts browser-sync.\r\n\t// If dev: watches less, compiles it to css, browser-sync handles reload\r\n\tif (isDev) {\r\n\t\tgulp.watch([\r\n\t\t\tconfig.client + 'app/themes' + THEME_NAME + '/less/**/*.*',\r\n\t\t\tconfig.less\r\n\t\t], ['styles'])\r\n\t\t\t.on('change', changeEvent);\r\n\t} else {\r\n\t\tgulp.watch([config.less, config.js, config.html], ['browserSyncReload'])\r\n\t\t\t.on('change', changeEvent);\r\n\t}\r\n\r\n\t...\r\n\t...\r\n\t...\r\n}\r\n\r\n```\r\n\r\n### Please specify which version of `generator-hottowel`, node and npm you're running\r\n\r\n- [x] generator-hottowel (0.0.11)\r\n- [ ] Node (8.9.4)\r\n- [ ] Npm (5.5.1)\r\n\r\n### Affected platforms\r\n\r\n- [ ] linux\r\n- [x] windows\r\n- [ ] OS X\r\n- [ ] other _(please specify which)_\r\n\r\n### Which gulp command are you running ?\r\n\r\n{gulp serve-dev}\r\n\r\n"}}
{"actor":{"display_login":"dashawk"}}