Skip to content

Commit a1a0a4a

Browse files
committed
feat(jest-transformer): initial commit
1 parent 6c51cc7 commit a1a0a4a

File tree

5 files changed

+32
-4
lines changed

5 files changed

+32
-4
lines changed

.commitlintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"always",
99
[
1010
"json-map-keys",
11-
"jest",
1211
"loader",
1312
"rollup"
13+
"jest-transformer",
1414
]
1515
]
1616
}
File renamed without changes.

packages/json-map-keys-jest/README.md renamed to packages/jest-transformer/README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,34 @@
11
# json-map-keys-jest
22

3-
> Jest transformer to replace json values with the key path.
3+
Jest transformer to replace json values with the keys path.
4+
5+
Example:
6+
7+
```json
8+
{
9+
"a": {
10+
"b": "Text Note"
11+
}
12+
}
13+
```
14+
15+
Will generate
16+
17+
```json
18+
{
19+
"a": {
20+
"b": "a.b"
21+
}
22+
}
23+
```
24+
25+
## Install
26+
27+
```sh
28+
npm install json-map-keys-jest --save-dev
29+
```
30+
31+
## Usage
432

533
```js
634
/** @type {import('jest').Config} */
File renamed without changes.

packages/json-map-keys-jest/package.json renamed to packages/jest-transformer/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "json-map-keys-jest",
33
"version": "1.0.0-beta.1",
44
"description": "Jest transformer to replace json values with the key path.",
5-
"homepage": "https://github.com/tiagoporto/json-map-keys/tree/main/packages/json-map-keys-jest#readme",
5+
"homepage": "https://github.com/tiagoporto/json-map-keys/tree/main/packages/jest-transformer#readme",
66
"keywords": [
77
"jest",
88
"transformer",
@@ -14,7 +14,7 @@
1414
"repository": {
1515
"type": "git",
1616
"url": "https://github.com/tiagoporto/json-map-keys.git",
17-
"directory": "packages/json-map-keys-jest"
17+
"directory": "packages/jest-transformer"
1818
},
1919
"funding": "https://github.com/sponsors/tiagoporto",
2020
"license": "MIT",

0 commit comments

Comments
 (0)