Skip to content

Commit 6ed60b8

Browse files
committed
init project.
0 parents  commit 6ed60b8

23 files changed

+981
-0
lines changed

.github/workflows/ci.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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+
# - run: npm run coverage
22+
# - name: Create Coverage Badges
23+
# uses: jaywcjlove/coverage-badges-cli@main
24+
# with:
25+
# source: core/coverage/coverage-summary.json
26+
# output: ./www/build/badges.svg
27+
28+
# - run: cp -rp core/coverage/lcov-report ./www/build/
29+
30+
- name: Generate Contributors Images
31+
uses: jaywcjlove/github-action-contributors@main
32+
with:
33+
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
34+
output: www/build/CONTRIBUTORS.svg
35+
avatarSize: 42
36+
37+
- name: Create Tag
38+
id: create_tag
39+
uses: jaywcjlove/create-tag-action@main
40+
with:
41+
token: ${{ secrets.GITHUB_TOKEN }}
42+
package-path: ./core/package.json
43+
44+
- name: get tag version
45+
id: tag_version
46+
uses: jaywcjlove/changelog-generator@main
47+
48+
- name: Deploy
49+
uses: peaceiris/actions-gh-pages@v3
50+
with:
51+
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
52+
github_token: ${{ secrets.GITHUB_TOKEN }}
53+
publish_dir: ./www/build
54+
55+
- name: Generate Changelog
56+
id: changelog
57+
uses: jaywcjlove/changelog-generator@main
58+
with:
59+
head-ref: ${{steps.create_tag.outputs.version}}
60+
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
61+
62+
- name: Create Release
63+
uses: ncipollo/release-action@v1
64+
if: steps.create_tag.outputs.successful
65+
with:
66+
token: ${{ secrets.GITHUB_TOKEN }}
67+
name: ${{ steps.create_tag.outputs.version }}
68+
tag: ${{ steps.create_tag.outputs.version }}
69+
body: |
70+
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-xml-reader@${{steps.create_tag.outputs.versionNumber}}/file/README.md)
71+
72+
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-xml-reader/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
73+
Or Doc Website: https://htmlpreview.github.io/?https://github.com/uiwjs/react-xml-reader/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
74+
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
75+
76+
```bash
77+
npm i @uiw/react-xml-reader@${{steps.create_tag.outputs.versionNumber}}
78+
```
79+
80+
${{ steps.changelog.outputs.changelog }}
81+
82+
- run: npm publish --access public
83+
name: 📦 @uiw/react-xml-reader publish to NPM
84+
continue-on-error: true
85+
working-directory: core
86+
env:
87+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

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

.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) 2023 uiw
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.

0 commit comments

Comments
 (0)