Skip to content

Commit 7819063

Browse files
committed
Add GitHub workflows
1 parent eea7409 commit 7819063

File tree

4 files changed

+50
-3
lines changed

4 files changed

+50
-3
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-node@v4
12+
with:
13+
node-version: 20
14+
- run: npm ci
15+
- run: npm run lint
16+
- run: npm run test
17+
- run: npm run build

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish Package
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
id-token: write # Required for OIDC
10+
contents: read
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
registry-url: 'https://registry.npmjs.org'
22+
- run: npm ci
23+
- run: npm run build
24+
- run: npm test
25+
- run: npm publish

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ Example:
7979
{
8080
objectNodesLimit: 50, // how many properties of an object should be shows before it gets paginatated with a pagination size of 50
8181
arrayNodesLimit: 50, // same as objectNodesLimit, but with array elements
82-
labelAsPath: false // if true the label for every node will show the full path to the element
82+
labelAsPath: false, // if true the label for every node will show the full path to the element
83+
linkLabelCopyPath: 'Copy path', // label for the copy path button in case of translation
84+
linkLabelExpandAll: 'Expand all', // label for the expand all button in case of translation
85+
collapseSameValue: 5, // if an array repeats the same value for this amount of times they will be collapsed
86+
showExtendedJson: false, // if true, extended JSON types like $date, $oid, $binary, etc. will be shown with their type
87+
maxStringPreviewLength: 250, // maximum length of string preview before it gets truncated with "..."
8388
}
8489
```
8590

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"watch-docs": "parcel docs-src/index.html --dist-dir docs/tmp --no-hmr",
1313
"lint": "tslint -c tslint.json -p tsconfig.json",
1414
"test": "jest",
15-
"publish-patch": "npm version patch && npm publish",
16-
"publish-minor": "npm version minor && npm publish",
15+
"version-patch": "npm version patch",
16+
"version-minor": "npm version minor",
1717
"precommit": "npm run build-docs && pretty-quick --staged"
1818
},
1919
"keywords": [

0 commit comments

Comments
 (0)