You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Remove process.cwd() trick from test files
* BREAKING: Switch from main to exports
* Add fs-extra/esm ESM named import module, with just fs-extra methods
Fixes#746
Copy file name to clipboardexpand all lines: README.md
+29-1
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@ Installation
27
27
Usage
28
28
-----
29
29
30
+
### CommonJS
31
+
30
32
`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.
31
33
32
34
You don't ever need to include the original `fs` module again:
@@ -55,6 +57,31 @@ const fs = require('fs')
55
57
constfse=require('fs-extra')
56
58
```
57
59
60
+
### ESM
61
+
62
+
There is also an `fs-extra/esm` import, that supports both default and named exports. However, note that `fs` methods are not included in `fs-extra/esm`; you still need to import `fs` and/or `fs/promises` seperately:
0 commit comments