https://github.com/jsmithdev/dir2dir
Copy a directory to a renamed directory while renaming matching child files
https://github.com/jsmithdev/dir2dir
Last synced: 24 days ago
JSON representation
Copy a directory to a renamed directory while renaming matching child files
- Host: GitHub
- URL: https://github.com/jsmithdev/dir2dir
- Owner: jsmithdev
- Created: 2021-01-22T17:08:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-07T21:44:40.000Z (over 2 years ago)
- Last Synced: 2025-10-04T17:14:56.388Z (8 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/dir2dir
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dir2dir
Copy a directory to a renamed directory while renaming matching child files (via cli)
## Install
`npm i -g dir2dir`
## Usage
`dir2dir path/to/originalComponent path/to/newComponent`
works well with Salesforce LWCs as well:
`dir2dir force-app/main/default/lwc/myLwc force-app/main/default/lwc/myCopiedLwc`
## Purpose
I use to clone a web-component
For example, if originalComponent has the path and contents:
directory/originalComponent
- originalComponent.css
- originalComponent.html
- originalComponent.js
then
`dir2dir directory/originalComponent directory/newComponent`
would create:
directory/newComponent
- newComponent.css
- newComponent.html
- newComponent.js
---
written while thinking of a 🐶 by [Jamie Smith](https://jsmith.dev)