Skip to content

Commit c8a9dc2

Browse files
committed
init project.
0 parents  commit c8a9dc2

36 files changed

+1613
-0
lines changed

.github/workflows/ci.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
build-deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
with:
14+
node-version: 16
15+
registry-url: 'https://registry.npmjs.org'
16+
17+
- run: npm install
18+
- run: npm run build
19+
- run: npm run doc
20+
21+
- name: Generate Contributors Images
22+
uses: jaywcjlove/github-action-contributors@main
23+
with:
24+
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
25+
output: www/build/CONTRIBUTORS.svg
26+
avatarSize: 42
27+
28+
- name: Create Tag
29+
id: create_tag
30+
uses: jaywcjlove/create-tag-action@main
31+
with:
32+
token: ${{ secrets.GITHUB_TOKEN }}
33+
package-path: ./core/package.json
34+
35+
- name: get tag version
36+
id: tag_version
37+
uses: jaywcjlove/changelog-generator@main
38+
39+
- name: Deploy
40+
uses: peaceiris/actions-gh-pages@v3
41+
with:
42+
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
publish_dir: ./www/build
45+
46+
- name: Generate Changelog
47+
id: changelog
48+
uses: jaywcjlove/changelog-generator@main
49+
with:
50+
head-ref: ${{steps.create_tag.outputs.version}}
51+
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
52+
53+
- name: Create Release
54+
uses: ncipollo/release-action@v1
55+
if: steps.create_tag.outputs.successful
56+
with:
57+
token: ${{ secrets.GITHUB_TOKEN }}
58+
name: ${{ steps.create_tag.outputs.version }}
59+
tag: ${{ steps.create_tag.outputs.version }}
60+
body: |
61+
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-json-view@${{steps.create_tag.outputs.versionNumber}}/file/README.md)
62+
63+
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-json-view/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
64+
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
65+
66+
```bash
67+
npm i @uiw/react-json-view@${{steps.create_tag.outputs.versionNumber}}
68+
```
69+
70+
${{ steps.changelog.outputs.changelog }}
71+
72+
- run: npm publish --access public
73+
name: 📦 @uiw/react-json-view publish to NPM
74+
continue-on-error: true
75+
env:
76+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
cjs
2+
esm
3+
build
4+
node_modules
5+
npm-debug.log*
6+
package-lock.json
7+
8+
.eslintcache
9+
.DS_Store
10+
.cache
11+
.vscode
12+
13+
*.bak
14+
*.tem
15+
*.temp
16+
#.swp
17+
*.*~
18+
~*.*

.lintstagedrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"*.{js,jsx,tsx,ts,less,md,json}": [
3+
"pretty-quick --staged"
4+
]
5+
}

.prettierignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
**/*.md
2+
**/*.svg
3+
**/*.ejs
4+
**/*.yml
5+
package.json
6+
node_modules
7+
dist
8+
build
9+
lib
10+
cjs
11+
esm
12+
test

.prettierrc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"printWidth": 120,
5+
"overrides": [
6+
{
7+
"files": ".prettierrc",
8+
"options": { "parser": "json" }
9+
},
10+
{
11+
"files": "*.{js,jsx}",
12+
"options": { "parser": "babel" }
13+
},
14+
{
15+
"files": "*.{ts,tsx}",
16+
"options": { "parser": "babel-ts" }
17+
},
18+
{
19+
"files": "*.{ts,tsx}",
20+
"options": { "parser": "typescript" }
21+
},
22+
{
23+
"files": "*.{less,css}",
24+
"options": { "parser": "css" }
25+
}
26+
]
27+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 小弟调调™
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./core/README.md

0 commit comments

Comments
 (0)