Skip to content

Commit 8047a1c

Browse files
committed
update README.md
1 parent a714130 commit 8047a1c

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

README.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
11
# jest-graphql-transformer
22

3-
A Jest transformer that enables **GraphQL queries in separate files**, similar to how [`graphql-tag` loader for Webpack](http://dev.apollodata.com/react/webpack.html) works.
4-
5-
Since Jest **does not support Webpack loaders**, this package provides the same transformation inside Jest.
3+
A Jest transformer that allows GraphQL queries in separate files, similar to the `graphql-tag` loader for Webpack, but adapted for Jest, which does not support Webpack loaders. This package provides the same transformation within Jest, enabling seamless GraphQL query imports.
64

75
---
86

9-
## 🚀 Installation
7+
## 🚀 Installation
108

11-
Install the package using **npm** or **yarn**:
9+
Install the package using **npm** or **yarn**:
1210

1311
```sh
1412
npm install --save-dev jest-graphql-transformer
1513
```
1614

17-
or
15+
or
1816

1917
```sh
2018
yarn add --dev jest-graphql-transformer
2119
```
2220

2321
---
2422

25-
## 🔧 Usage
23+
## 🔧 Usage
2624

27-
### ✅ Configure Jest to Use the Transformer
25+
### ✅ Configure Jest to Use the Transformer
2826

29-
#### 📌 **In `package.json`**
27+
#### 📌 **In `package.json`**
3028

31-
Add the following to your Jest configuration:
29+
Add the following to your Jest configuration:
3230

3331
```json
3432
"jest": {
@@ -39,7 +37,7 @@ Add the following to your Jest configuration:
3937
}
4038
```
4139

42-
#### 📌 **Or in `jest.config.js` / `jest.config.ts`**
40+
#### 📌 **Or in `jest.config.js` / `jest.config.ts`**
4341

4442
```javascript
4543
export default {
@@ -49,10 +47,10 @@ export default {
4947
};
5048
```
5149

52-
### ⚠️ **Note:**
50+
### ⚠️ **Note:**
5351

54-
Once you define the `transform` property, **Jest's default transformations will be overridden**.
55-
If you need Babel for other files, make sure to include it:
52+
Once you define the `transform` property, **Jest's default transformations will be overridden**.
53+
If you need Babel for other files, make sure to include it:
5654

5755
```javascript
5856
export default {
@@ -65,6 +63,6 @@ export default {
6563

6664
---
6765

68-
## 📜 License
66+
## 📜 License
6967

70-
MIT License © 2024 [hamidyfine](https://github.com/hamidyfine)
68+
MIT License © 2024 [hamidyfine](https://github.com/hamidyfine)

0 commit comments

Comments
 (0)