{"id":15042741,"url":"https://github.com/sindresorhus/gulp-revert-path","last_synced_at":"2025-10-19T19:31:01.136Z","repository":{"uuid":"35732332","full_name":"sindresorhus/gulp-revert-path","owner":"sindresorhus","description":"Revert the previous `file.path` change","archived":false,"fork":false,"pushed_at":"2023-11-03T13:13:39.000Z","size":14,"stargazers_count":18,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-04-14T06:10:45.745Z","etag":null,"topics":["gulp-plugin","javascript","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sindresorhus.png","metadata":{"funding":{"github":"sindresorhus","open_collective":"sindresorhus","custom":"https://sindresorhus.com/donate"},"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-05-16T17:02:59.000Z","updated_at":"2023-11-03T13:11:49.000Z","dependencies_parsed_at":"2023-11-19T19:47:07.301Z","dependency_job_id":null,"html_url":"https://github.com/sindresorhus/gulp-revert-path","commit_stats":{"total_commits":17,"total_committers":4,"mean_commits":4.25,"dds":"0.17647058823529416","last_synced_commit":"5dc4e128da8bf9edee09ff6af3065b32c0adac77"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fgulp-revert-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fgulp-revert-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fgulp-revert-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fgulp-revert-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/gulp-revert-path/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":196754241,"owners_count":13260969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gulp-plugin","javascript","nodejs"],"created_at":"2024-09-24T20:47:55.549Z","updated_at":"2025-10-19T19:31:00.846Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://sindresorhus.com/donate"],"categories":[],"sub_categories":[],"readme":"# gulp-revert-path\n\n\u003e Revert the previous `file.path` change\n\nMany plugins change the `file.path` somehow. Most commonly the file extension. For example `gulp-babel` changes `.jsx` extensions to `.js` since it compiles JSX. Sometimes that's undesirable though. This plugin makes it easy to revert the path change.\n\n## Install\n\n```sh\nnpm install --save-dev gulp-revert-path\n```\n\n## Usage\n\n```js\nimport gulp from 'gulp';\nimport babel from 'gulp-babel';\nimport revertPath from 'gulp-revert-path';\nimport rename from 'gulp-rename';\n\nexport default () =\u003e (\n\tgulp.src('src/app.jsx')\n\t\t.pipe(babel())       // file.path =\u003e src/app.js\n\t\t.pipe(revertPath())  // file.path =\u003e src/app.jsx\n\t\t.pipe(gulp.dest('dist'))\n);\n\nexport const es2015 = () =\u003e (\n\tgulp.src('src/app.txt')\n\t\t.pipe(rename('src/app.jsx'))  // file.path =\u003e src/app.jsx\n\t\t.pipe(babel())                // file.path =\u003e src/app.js\n\t\t.pipe(revertPath(2))          // file.path =\u003e src/app.txt\n\t\t.pipe(gulp.dest('dist'))\n);\n```\n\n## API\n\n### revertPath(reversionCount?)\n\n#### reversionCount\n\nType: `number`\\\nDefault: `1`\n\nThe number of times to revert the path.\n\n## Related\n\n- [vinyl-paths](https://github.com/sindresorhus/vinyl-paths) - Get the file paths in a vinyl stream\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fgulp-revert-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fgulp-revert-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fgulp-revert-path/lists"}