{"action":"created","issue":{"url":"https://api.github.com/repos/Zhouzi/gulp-revise/issues/3","repository_url":"https://api.github.com/repos/Zhouzi/gulp-revise","labels_url":"https://api.github.com/repos/Zhouzi/gulp-revise/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/Zhouzi/gulp-revise/issues/3/comments","events_url":"https://api.github.com/repos/Zhouzi/gulp-revise/issues/3/events","html_url":"https://github.com/Zhouzi/gulp-revise/issues/3","id":192810021,"number":3,"title":"Fails to read .rev file with sass sub folders","user":{"login":"Zhouzi","id":2291025,"avatar_url":"https://avatars.githubusercontent.com/u/2291025?v=3","gravatar_id":"","url":"https://api.github.com/users/Zhouzi","html_url":"https://github.com/Zhouzi","followers_url":"https://api.github.com/users/Zhouzi/followers","following_url":"https://api.github.com/users/Zhouzi/following{/other_user}","gists_url":"https://api.github.com/users/Zhouzi/gists{/gist_id}","starred_url":"https://api.github.com/users/Zhouzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zhouzi/subscriptions","organizations_url":"https://api.github.com/users/Zhouzi/orgs","repos_url":"https://api.github.com/users/Zhouzi/repos","events_url":"https://api.github.com/users/Zhouzi/events{/privacy}","received_events_url":"https://api.github.com/users/Zhouzi/received_events","type":"User","site_admin":false},"labels":[{"id":351675204,"url":"https://api.github.com/repos/Zhouzi/gulp-revise/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-01T10:43:08Z","updated_at":"2016-12-01T13:12:45Z","closed_at":"2016-12-01T13:12:45Z","body":"Gulp task:\r\n\r\n```\r\ngulp.task('styles', function() {\r\n  return gulp\r\n    .src('./src/**/*.scss')\r\n    .pipe(sass())\r\n    .pipe(revise())\r\n    .pipe(revise.write('dist'))\r\n    .pipe(gulp.dest('dist'));\r\n});\r\n```\r\n\r\nFolder structure:\r\n\r\n```\r\ndist/\r\n  pages/\r\n    home_123.css\r\n    home.css.rev\r\n  styles.css\r\n  styles.css.rev\r\nsrc/\r\n  pages/\r\n    home.scss\r\n  styles.scss\r\n```\r\n\r\nSass creates a corresponding `.css` file for each `.scss` file that lacks a `_` prefix. So it may create some subfolders. The issue is that `revise.write('dist')` consider `dist` to be the output directory (while it's actually `dist/pages` for `home.css`).\r\n\r\nIt means that `revise.write` fails to read the `.rev` file and thus cannot delete the old revision."},"comment":{"url":"https://api.github.com/repos/Zhouzi/gulp-revise/issues/comments/264170022","html_url":"https://github.com/Zhouzi/gulp-revise/issues/3#issuecomment-264170022","issue_url":"https://api.github.com/repos/Zhouzi/gulp-revise/issues/3","id":264170022,"user":{"login":"Zhouzi","id":2291025,"avatar_url":"https://avatars.githubusercontent.com/u/2291025?v=3","gravatar_id":"","url":"https://api.github.com/users/Zhouzi","html_url":"https://github.com/Zhouzi","followers_url":"https://api.github.com/users/Zhouzi/followers","following_url":"https://api.github.com/users/Zhouzi/following{/other_user}","gists_url":"https://api.github.com/users/Zhouzi/gists{/gist_id}","starred_url":"https://api.github.com/users/Zhouzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zhouzi/subscriptions","organizations_url":"https://api.github.com/users/Zhouzi/orgs","repos_url":"https://api.github.com/users/Zhouzi/repos","events_url":"https://api.github.com/users/Zhouzi/events{/privacy}","received_events_url":"https://api.github.com/users/Zhouzi/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T13:12:45Z","updated_at":"2016-12-01T13:12:45Z","body":"Fixed as of v1.1.0"}}
{"actor":{"display_login":"Zhouzi"}}