Skip to content

Commit

Permalink
Rename package from cp-file to copy-file
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Nov 5, 2023
1 parent 58e1009 commit 129a921
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export type AsyncOptions = {
@example
```
import {copyFile} from 'cp-file';
import {copyFile} from 'copy-file';
await copyFile('source/unicorn.png', 'destination/unicorn.png', {
onProgress: progress => {
Expand Down Expand Up @@ -83,7 +83,7 @@ The file is cloned if the `onProgress` option is not passed and the [file system
@example
```
import {copyFile} from 'cp-file';
import {copyFile} from 'copy-file';
await copyFile('source/unicorn.png', 'destination/unicorn.png');
console.log('File copied');
Expand All @@ -101,7 +101,7 @@ The file is cloned if the [file system supports it](https://stackoverflow.com/a/
@example
```
import {copyFileSync} from 'cp-file';
import {copyFileSync} from 'copy-file';
copyFileSync('source/unicorn.png', 'destination/unicorn.png');
```
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "cp-file",
"name": "copy-file",
"version": "10.0.0",
"description": "Copy a file",
"license": "MIT",
"repository": "sindresorhus/cp-file",
"repository": "sindresorhus/copy-file",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
Expand Down
10 changes: 5 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cp-file
# copy-file

> Copy a file
Expand All @@ -8,19 +8,19 @@
- Resilient by using [graceful-fs](https://github.com/isaacs/node-graceful-fs).
- User-friendly by creating non-existent destination directories for you.
- Can be safe by turning off [overwriting](#overwrite).
- Preserves file mode [but not ownership](https://github.com/sindresorhus/cp-file/issues/22#issuecomment-502079547).
- Preserves file mode [but not ownership](https://github.com/sindresorhus/copy-file/issues/22#issuecomment-502079547).
- User-friendly errors.

## Install

```sh
npm install cp-file
npm install copy-file
```

## Usage

```js
import {copyFile} from 'cp-file';
import {copyFile} from 'copy-file';

await copyFile('source/unicorn.png', 'destination/unicorn.png');
console.log('File copied');
Expand Down Expand Up @@ -108,7 +108,7 @@ Only available when using the async method.
- For empty files, the `onProgress` callback function is emitted only once.

```js
import {copyFile} from 'cp-file';
import {copyFile} from 'copy-file';

await copyFile(source, destination, {
onProgress: progress => {
Expand Down

0 comments on commit 129a921

Please sign in to comment.