{"id":22423268,"url":"https://github.com/prantlf/grunt-move","last_synced_at":"2025-08-01T07:32:08.059Z","repository":{"id":49837980,"uuid":"79029590","full_name":"prantlf/grunt-move","owner":"prantlf","description":"Grunt task for moving and renaming files and directories.","archived":false,"fork":false,"pushed_at":"2022-07-27T06:48:47.000Z","size":248,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-25T05:32:51.880Z","etag":null,"topics":["grunt-move","grunt-task","gruntfile","rename","rename-files"],"latest_commit_sha":null,"homepage":"","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/prantlf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-15T11:52:59.000Z","updated_at":"2022-07-28T07:07:52.000Z","dependencies_parsed_at":"2022-09-04T14:54:29.179Z","dependency_job_id":null,"html_url":"https://github.com/prantlf/grunt-move","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgrunt-move","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgrunt-move/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgrunt-move/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgrunt-move/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prantlf","download_url":"https://codeload.github.com/prantlf/grunt-move/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228348394,"owners_count":17905899,"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":["grunt-move","grunt-task","gruntfile","rename","rename-files"],"created_at":"2024-12-05T18:09:50.987Z","updated_at":"2024-12-05T18:09:51.576Z","avatar_url":"https://github.com/prantlf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-move\n\n[![Latest version](https://img.shields.io/npm/v/grunt-move)\n ![Dependency status](https://img.shields.io/librariesio/release/npm/grunt-move)\n](https://www.npmjs.com/package/grunt-move)\n[![Coverage](https://codecov.io/gh/prantlf/grunt-move/branch/master/graph/badge.svg)](https://codecov.io/gh/prantlf/grunt-move)\n\nThis module provides a grunt multi-task for moving and renaming files and directories.\n\n## Installation\n\nYou need [node \u003e= 10][node], [npm] and [grunt \u003e= 1][Grunt] installed\nand your project build managed by a [Gruntfile] with the necessary modules\nlisted in [package.json].  If you haven't used Grunt before, be sure to\ncheck out the [Getting Started] guide, as it explains how to create a\nGruntfile as well as install and use Grunt plugins.\n\nInstall the Grunt task:\n\n```shell\n$ npm install grunt-move --save-dev\n```\n\n## Configuration\n\nAdd the `move` entry with the move task configuration to the\noptions of the `grunt.initConfig` method:\n\n```js\ngrunt.initConfig({\n  move: {\n    test: {\n      src: 'old',\n      dest: 'new'\n    }\n  }\n});\n```\n\nThen, load the plugin:\n\n```javascript\ngrunt.loadNpmTasks('grunt-move');\n```\n\n## Build\n\nCall the `move` task:\n\n```shell\n$ grunt move\n```\n\nor integrate it to your build sequence in `Gruntfile.js`:\n\n```js\ngrunt.registerTask('default', ['move', ...]);\n```\n\n## Customizing\n\nDefault behaviour of the task can be tweaked by the task options; these\nare the defaults:\n\n```js\ngrunt.initConfig({\n  move: {\n    task: {\n      options: {\n        ignoreMissing: false,\n        moveAcrossVolumes: false\n      },\n      src: ...,\n      dest: ...\n    }\n  }\n});\n```\n\nThe configuration consists of `src` and `dest` property pairs.  The `src`\nproperty has to point to an existing source path.  The `dest` property has\nto point to the path, where the source file or directory should be moved.\n\nIf you do not end the `dest` path by the path separator (slash, for example),\nthe `dest` path will be considered as if it includes the target name and the\nsource file or directory will be moved and get this target complete path.\n\nIf you end the `dest` path by a path separator (slash, for example), the\nsource file or directory will be moved there retaining its name.\n\nIf you specify more source files or directories, or use wildcards, the target\npath should be a directory - end by the path separator (slash, for example).\n\n### Options\n\n#### ignoreMissing\nType: `Boolean`\nDefault: `false`\n\nIf the `src` property does not point to any files, or if it is missing,\nthe task will make the Grunt run fail.  If you set the `ignoreMissing`\noption to `true`, Grunt will continue executing other tasks.\n\n#### moveAcrossVolumes\nType: `Boolean`\nDefault: `false`\n\nIf the `src` property points to a file or directory, which is located\non other volume (drive), that the `dest` path, the task will make the\nGrunt run fail.  If you set the `moveAcrossVolumes` option to `true`,\nthe file or directory will be copied to the target path and when it\nsucceeds, the source will be deleted. Grunt will continue executing\nother tasks then.\n\n### More Usage Examples\n\n```js\n  move: {\n    do_not_fail_if_missing: {\n      options: {\n        ignoreMissing: true\n      },\n      src: 'test/work/missing/old',\n      dest: 'test/work/missing/new'\n    }\n    rename: {\n      src: 'test/work/rename/old',\n      dest: 'test/work/rename/new'\n    },\n    move_with_rename: {\n      src: 'test/work/move_with_rename/source/old',\n      dest: 'test/work/move_with_rename/target/new'\n    },\n    move_without_rename: {\n      src: 'test/work/move_without_rename/source/file',\n      dest: 'test/work/move_without_rename/target/'\n    },\n    move_more: {\n      src: ['test/work/move_more_files/source/first',\n            'test/work/move_more_files/source/second'],\n      dest: 'test/work/move_more_files/target/'\n    },\n    move_with_wildcard: {\n      src: ['test/work/move_files_with_wildcard/source/*'],\n      dest: 'test/work/move_files_with_wildcard/target/'\n    },\n    move_across_volumes: {\n      options: {\n        moveAcrossVolumes: true\n      },\n      src: 'test/work/move_across_volumes/file',\n      dest: '/tmp/grunt-move/file'\n    },\n    rename_multiple: {\n      files: [\n        {\n          src: 'test/work/rename_multiple/first',\n          dest: 'test/work/rename_multiple/third'\n        },\n        {\n          src: 'test/work/rename_multiple/second',\n          dest: 'test/work/rename_multiple/fourth'\n        }\n      ]\n    },\n    move_multiple: {\n      files: [\n        {\n          src: ['test/work/move_more/source1/first',\n                'test/work/move_more/source1/second'],\n          dest: 'test/work/move_more/target1/'\n        },\n        {\n          src: 'test/work/move_more/source2/*',\n          dest: 'test/work/move_more/target2/'\n        }\n      ]\n    }\n  }\n});\n```\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding\nstyle.  Add unit tests for any new or changed functionality. Lint and test\nyour code using Grunt.\n\n## License\n\nCopyright (c) 2017-2022 Ferdinand Prantl\n\nLicensed under the MIT license.\n\n[node]: http://nodejs.org\n[npm]: http://npmjs.org\n[package.json]: https://docs.npmjs.com/files/package.json\n[Grunt]: https://gruntjs.com\n[Gruntfile]: http://gruntjs.com/sample-gruntfile\n[Getting Gtarted]: https://github.com/gruntjs/grunt/wiki/Getting-started\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fgrunt-move","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprantlf%2Fgrunt-move","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fgrunt-move/lists"}