Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: PathRef.prototype.copyFileToDir #154

Merged
merged 1 commit into from
Jul 4, 2023
Merged

Conversation

dsherret
Copy link
Owner

@dsherret dsherret commented Jul 4, 2023

I found myself writing stuff like:

currentDir.join("bin.js").copyFileSync(dprintDir.join("bin.js"));
currentDir.join("install_api.js").copyFileSync(dprintDir.join("install_api.js"));
currentDir.join("install.js").copyFileSync(dprintDir.join("install.js"));

This could be simplified to:

currentDir.join("bin.js").copyFileToDirSync(dprintDir);
currentDir.join("install_api.js").copyFileToDirSync(dprintDir);
currentDir.join("install.js").copyFileToDirSync(dprintDir);

@dsherret dsherret changed the title feat: PathRef#copyFileToDir feat: PathRef.prototype.copyFileToDir Jul 4, 2023
@dsherret dsherret merged commit e294af9 into main Jul 4, 2023
@dsherret dsherret deleted the feat_copy_file_to_dir branch July 4, 2023 00:46
* Copies the file to the specified directory.
* @returns The destination file path.
*/
copyFileToDir(destinationDirPath: string | URL | PathRef): PathRef {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #155 to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant