Skip to content

Commit d175aa1

Browse files
authored
docs: add installation instructions to top of README (#93)
1 parent 78dc2ca commit d175aa1

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@ Generate massive amounts of fake data in the browser and node.js.
55
[![Chat on Discord](https://img.shields.io/discord/929487054990110771)](https://discord.com/invite/4qDjAmDj4P)
66
[![Continuous Integration](https://github.com/faker-js/faker/actions/workflows/ci.yml/badge.svg)](https://github.com/faker-js/faker/actions/workflows/ci.yml)
77

8+
## Installation
9+
10+
Please replace your `faker` dependency with `@faker-js/faker`. This is the official, stable fork of Faker.
11+
12+
```shell
13+
npm install @faker-js/faker -D
14+
```
15+
16+
### Typescript Support
17+
18+
Types are available via the `@types/faker` package. You must manually link them using a `*.d.ts` file, like so:
19+
20+
```typescript
21+
// faker.d.ts
22+
declare module '@faker-js/faker' {
23+
import faker from 'faker';
24+
export default faker;
25+
}
26+
```
27+
828
## FAQ - What happened to the original faker.js?
929

1030
This project was originally created and hosted at https://github.com/marak/Faker.js/ - however around 4th Jan, 2022 - the author decided to delete the repository (for unknown reasons).

0 commit comments

Comments
 (0)