{"action":"created","issue":{"url":"https://api.github.com/repos/olefredrik/FoundationPress/issues/745","repository_url":"https://api.github.com/repos/olefredrik/FoundationPress","labels_url":"https://api.github.com/repos/olefredrik/FoundationPress/issues/745/labels{/name}","comments_url":"https://api.github.com/repos/olefredrik/FoundationPress/issues/745/comments","events_url":"https://api.github.com/repos/olefredrik/FoundationPress/issues/745/events","html_url":"https://github.com/olefredrik/FoundationPress/issues/745","id":138057384,"number":745,"title":"npm run production watches files","user":{"login":"jpresley23","id":17302670,"avatar_url":"https://avatars.githubusercontent.com/u/17302670?v=3","gravatar_id":"","url":"https://api.github.com/users/jpresley23","html_url":"https://github.com/jpresley23","followers_url":"https://api.github.com/users/jpresley23/followers","following_url":"https://api.github.com/users/jpresley23/following{/other_user}","gists_url":"https://api.github.com/users/jpresley23/gists{/gist_id}","starred_url":"https://api.github.com/users/jpresley23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpresley23/subscriptions","organizations_url":"https://api.github.com/users/jpresley23/orgs","repos_url":"https://api.github.com/users/jpresley23/repos","events_url":"https://api.github.com/users/jpresley23/events{/privacy}","received_events_url":"https://api.github.com/users/jpresley23/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-03T02:41:10Z","updated_at":"2016-03-09T14:13:27Z","closed_at":null,"body":"I'm setting up a build script for production for our project and used 'npm run production' as instructed README.md. I've noticed that results in watching files. Is there a way to use 'npm run production' without watching files? I also noticed that http://localhost:3000 is automatically opened in the browser,  which is also not desirable for a production build."},"comment":{"url":"https://api.github.com/repos/olefredrik/FoundationPress/issues/comments/194311618","html_url":"https://github.com/olefredrik/FoundationPress/issues/745#issuecomment-194311618","issue_url":"https://api.github.com/repos/olefredrik/FoundationPress/issues/745","id":194311618,"user":{"login":"jpresley23","id":17302670,"avatar_url":"https://avatars.githubusercontent.com/u/17302670?v=3","gravatar_id":"","url":"https://api.github.com/users/jpresley23","html_url":"https://github.com/jpresley23","followers_url":"https://api.github.com/users/jpresley23/followers","following_url":"https://api.github.com/users/jpresley23/following{/other_user}","gists_url":"https://api.github.com/users/jpresley23/gists{/gist_id}","starred_url":"https://api.github.com/users/jpresley23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpresley23/subscriptions","organizations_url":"https://api.github.com/users/jpresley23/orgs","repos_url":"https://api.github.com/users/jpresley23/repos","events_url":"https://api.github.com/users/jpresley23/events{/privacy}","received_events_url":"https://api.github.com/users/jpresley23/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T14:13:27Z","updated_at":"2016-03-09T14:13:27Z","body":"No it does't. I've also tried moving the `if(!isProduction)` to wrap the entire contents of the function to read \r\n`// Run build task and watch for file changes\r\ngulp.task('default', ['build', 'browser-sync'], function() {\r\n\r\nif(!isProduction) {\r\n  // Log file changes to console\r\n  function logFileChange(event) {\r\n    var fileName = require('path').relative(__dirname, event.path);\r\n    console.log('[' + 'WATCH'.green + '] ' + fileName.magenta + ' was ' + event.type + ', running tasks...');\r\n  }\r\n\r\n\r\n  // Sass Watch\r\n  gulp.watch(['assets/scss/**/*.scss'], ['clean:css', 'sass'])\r\n    .on('change', function(event) {\r\n      logFileChange(event);\r\n    });\r\n\r\n  // JS Watch\r\n  gulp.watch(['assets/javascript/custom/**/*.js'], ['clean:javascript', 'javascript', 'lint'])\r\n    .on('change', function(event) {\r\n      logFileChange(event);\r\n    });\r\n}`\r\n\r\nwith no luck."}}