{"action":"created","issue":{"url":"https://api.github.com/repos/Dragory/gulp-hash/issues/11","labels_url":"https://api.github.com/repos/Dragory/gulp-hash/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/Dragory/gulp-hash/issues/11/comments","events_url":"https://api.github.com/repos/Dragory/gulp-hash/issues/11/events","html_url":"https://github.com/Dragory/gulp-hash/issues/11","id":124183384,"number":11,"title":"[ReferenceError: fs is not defined]","user":{"login":"xsmallbird","id":5066807,"avatar_url":"https://avatars.githubusercontent.com/u/5066807?v=3","gravatar_id":"","url":"https://api.github.com/users/xsmallbird","html_url":"https://github.com/xsmallbird","followers_url":"https://api.github.com/users/xsmallbird/followers","following_url":"https://api.github.com/users/xsmallbird/following{/other_user}","gists_url":"https://api.github.com/users/xsmallbird/gists{/gist_id}","starred_url":"https://api.github.com/users/xsmallbird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xsmallbird/subscriptions","organizations_url":"https://api.github.com/users/xsmallbird/orgs","repos_url":"https://api.github.com/users/xsmallbird/repos","events_url":"https://api.github.com/users/xsmallbird/events{/privacy}","received_events_url":"https://api.github.com/users/xsmallbird/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-29T08:59:00Z","updated_at":"2015-12-30T08:09:08Z","closed_at":null,"body":"hello, may be you can lint your code by eslint, there are many style problem.\r\n\r\nand\r\n\r\nhash.manifest function design has a problem, why not *fs.readFileSync(dest + manifestPath, {encoding: 'utf8'});* in line 74."},"comment":{"url":"https://api.github.com/repos/Dragory/gulp-hash/issues/comments/167955097","html_url":"https://github.com/Dragory/gulp-hash/issues/11#issuecomment-167955097","issue_url":"https://api.github.com/repos/Dragory/gulp-hash/issues/11","id":167955097,"user":{"login":"Dragory","id":2606411,"avatar_url":"https://avatars.githubusercontent.com/u/2606411?v=3","gravatar_id":"","url":"https://api.github.com/users/Dragory","html_url":"https://github.com/Dragory","followers_url":"https://api.github.com/users/Dragory/followers","following_url":"https://api.github.com/users/Dragory/following{/other_user}","gists_url":"https://api.github.com/users/Dragory/gists{/gist_id}","starred_url":"https://api.github.com/users/Dragory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dragory/subscriptions","organizations_url":"https://api.github.com/users/Dragory/orgs","repos_url":"https://api.github.com/users/Dragory/repos","events_url":"https://api.github.com/users/Dragory/events{/privacy}","received_events_url":"https://api.github.com/users/Dragory/received_events","type":"User","site_admin":false},"created_at":"2015-12-30T08:09:08Z","updated_at":"2015-12-30T08:09:08Z","body":"Thanks, I see your point. I don't think this is a concern. `gulp.dest('public')` will still save the file in `process.cwd() + '/public/assets.json'` because of the `'public'` parameter. Additionally, if the destination directory was to be added to manifestPath, gulp.dest('public') would result in `public/public/assets.json`.\r\n\r\nHowever, if you still need to change the path of the manifest file itself (i.e. doing `gulp.dest('public')` is not enough for some reason), I recommend checking out [gulp-rename](https://www.npmjs.com/package/gulp-rename). Here's an untested example:\r\n\r\n```javascript\r\ngulp.src('js/**/*.js')\r\n    .pipe(hash())\r\n    .pipe(gulp.dest('public/js'))\r\n    .pipe(hash.manifest('assets.json'))\r\n    .pipe(rename(function(p) {\r\n        // Add 'public' to dirname\r\n        p.dirname += '/public';\r\n    }))\r\n    .pipe(gulp.dest('.'));\r\n```"}}