{"action":"created","issue":{"url":"https://api.github.com/repos/olefredrik/FoundationPress/issues/727","repository_url":"https://api.github.com/repos/olefredrik/FoundationPress","labels_url":"https://api.github.com/repos/olefredrik/FoundationPress/issues/727/labels{/name}","comments_url":"https://api.github.com/repos/olefredrik/FoundationPress/issues/727/comments","events_url":"https://api.github.com/repos/olefredrik/FoundationPress/issues/727/events","html_url":"https://github.com/olefredrik/FoundationPress/issues/727","id":133839733,"number":727,"title":"adding the UNCSS task in my gulpfile.js","user":{"login":"carmolim","id":2863161,"avatar_url":"https://avatars.githubusercontent.com/u/2863161?v=3","gravatar_id":"","url":"https://api.github.com/users/carmolim","html_url":"https://github.com/carmolim","followers_url":"https://api.github.com/users/carmolim/followers","following_url":"https://api.github.com/users/carmolim/following{/other_user}","gists_url":"https://api.github.com/users/carmolim/gists{/gist_id}","starred_url":"https://api.github.com/users/carmolim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carmolim/subscriptions","organizations_url":"https://api.github.com/users/carmolim/orgs","repos_url":"https://api.github.com/users/carmolim/repos","events_url":"https://api.github.com/users/carmolim/events{/privacy}","received_events_url":"https://api.github.com/users/carmolim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-15T23:11:06Z","updated_at":"2016-02-17T18:04:16Z","closed_at":null,"body":"Hello, I'm starting to use the foundationpress, and I have no experience with Gulp.\r\nI'm finishing my first site using it and I want to run uncss to get a smaller css file. \r\n\r\nI added this task:\r\n\r\n```\r\ngulp.task('uncss', function() {\r\n  return gulp.src('assets/stylesheets/foundation.css')\r\n    .pipe(uncss({\r\n      html: [\r\n          'http://192.168.1.90/e-leeze/',\r\n          'http://192.168.1.90/e-leeze/saude',\r\n          'http://192.168.1.90/e-leeze/arquivo',\r\n          'http://192.168.1.90/e-leeze/mais-visualizadas/'\r\n      ]\r\n    }))\r\n    .pipe(gulp.dest('assets/stylesheets'));\r\n});\r\n``` \r\nchanged the build task:\r\n```\r\n// Build task\r\n// Runs copy then runs sass & javascript in parallel\r\ngulp.task('build', ['clean'], function(done) {\r\n  sequence('copy',\r\n          ['sass', 'uncss', 'javascript', 'lint'],\r\n          done);\r\n});\r\n```\r\nthan I changed the watch function:\r\n\r\n```\r\n  // Sass Watch\r\n  gulp.watch(['assets/scss/**/*.scss'], ['clean:css', 'sass', 'uncss'])\r\n    .on('change', function(event) {\r\n      logFileChange(event);\r\n    });\r\n```\r\n\r\nwhen I run ```npm run watch``` it run ok, but when I change some scss file it crashes generating this error:\r\n\r\n``` \r\nevents.js:141\r\n      throw er; // Unhandled 'error' event\r\n      ^\r\nError: ENOENT: no such file or directory, open '/Applications/MAMP/htdocs/e-leeze/wp-content/themes/eleeze/assets/stylesheets/foundation.css'\r\n    at Error (native)\r\nnpm ERR! Darwin 14.5.0\r\nnpm ERR! argv \"/usr/local/bin/node\" \"/usr/local/bin/npm\" \"run\" \"watch\"\r\nnpm ERR! node v4.2.6\r\nnpm ERR! npm  v2.14.12\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! foundationpress@2.3.0 watch: `gulp`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the foundationpress@2.3.0 watch script 'gulp'.\r\nnpm ERR! This is most likely a problem with the foundationpress package,\r\nnpm ERR! not with npm itself.\r\nnpm ERR! Tell the author that this fails on your system:\r\nnpm ERR!     gulp\r\nnpm ERR! You can get their info via:\r\nnpm ERR!     npm owner ls foundationpress\r\nnpm ERR! There is likely additional logging output above.\r\nnpm ERR! Please include the following file with any support request:\r\nnpm ERR!     /Applications/MAMP/htdocs/e-leeze/wp-content/themes/eleeze/npm-debug.log\r\n```\r\n\r\nbut I can't see the file ```  /Applications/MAMP/htdocs/e-leeze/wp-content/themes/eleeze/npm-debug.log``` \r\n\r\nSomeone could help me?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/olefredrik/FoundationPress/issues/comments/185327842","html_url":"https://github.com/olefredrik/FoundationPress/issues/727#issuecomment-185327842","issue_url":"https://api.github.com/repos/olefredrik/FoundationPress/issues/727","id":185327842,"user":{"login":"colin-marshall","id":4453733,"avatar_url":"https://avatars.githubusercontent.com/u/4453733?v=3","gravatar_id":"","url":"https://api.github.com/users/colin-marshall","html_url":"https://github.com/colin-marshall","followers_url":"https://api.github.com/users/colin-marshall/followers","following_url":"https://api.github.com/users/colin-marshall/following{/other_user}","gists_url":"https://api.github.com/users/colin-marshall/gists{/gist_id}","starred_url":"https://api.github.com/users/colin-marshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colin-marshall/subscriptions","organizations_url":"https://api.github.com/users/colin-marshall/orgs","repos_url":"https://api.github.com/users/colin-marshall/repos","events_url":"https://api.github.com/users/colin-marshall/events{/privacy}","received_events_url":"https://api.github.com/users/colin-marshall/received_events","type":"User","site_admin":false},"created_at":"2016-02-17T18:04:15Z","updated_at":"2016-02-17T18:04:15Z","body":"You could probably combine the uncss task into the Sass task, but I wouldn't necessarily say it's a better approach. Just a different way of accomplishing the same thing.\r\n\r\nOn a side note you should look at the Foundation Zurb Template's gulpfile. It has some ignore rules for uncss that you should add so that classes that are added to the page after pageload are not removed from your CSS.\r\n\r\nhttps://github.com/zurb/foundation-zurb-template/blob/b3326dd41afd390d47c31590ab3aa4c69897fd17/gulpfile.js#L107"}}