Skip to content

Commit 2fb5ac2

Browse files
committed
rename
1 parent 40102cc commit 2fb5ac2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
# with-tmpdir [![Build Status](https://travis-ci.org/charliekenney23/with-tmpdir.svg?branch=master)](https://travis-ci.org/charliekenney23/with-tmpdir)
1+
# with-tmp [![Build Status](https://travis-ci.org/charliekenney23/with-tmp.svg?branch=master)](https://travis-ci.org/charliekenney23/with-tmp)
22

33
### Easily create a temporary directory without having to worry about cleanup.
44

55
```typescript
6-
import withTmpdir from 'with-tmpdir';
6+
import withTmpdir from "with-tmp";
77

8-
await withTmpdir('my-tmp-dir', dir => {
9-
const path = path.join(dir, 'my-file');
10-
fs.writeFileSync(path, 'content');
8+
await withTmpdir("my-tmp-dir", dir => {
9+
const path = path.join(dir, "my-file");
10+
fs.writeFileSync(path, "content");
1111
}); // tmpdir is cleaned up
1212
```
1313

1414
### Do tasks from within the temporary directory without having to worry about restoring your environment.
1515

1616
```typescript
17-
import { withinTmpdir } from 'with-tmpdir';
17+
import { withinTmpdir } from "with-tmp";
1818

1919
process.cwd(); // => /home/me/workspace
20-
await withinTmpdir('my-other-tmp-dir', dir => {
20+
await withinTmpdir("my-other-tmp-dir", dir => {
2121
process.cwd(); // => /private/var/folders/83/5913m0b1080000gn/T/my-other-tmp-dir2Ivp7V
2222
});
2323
```

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "with-tmpdir",
2+
"name": "with-tmp",
33
"author": "Charles Kenney <me@ch4z.io>",
44
"version": "1.0.0",
55
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)