Skip to content

Commit 07a3565

Browse files
authored
Merge pull request mxdi9i7#20 from mxdi9i7/ssysm/ci
Add CI, remove extra folder in .gitignore
2 parents 88bda78 + 7171cc8 commit 07a3565

File tree

9 files changed

+60
-13
lines changed

9 files changed

+60
-13
lines changed
File renamed without changes.

.github/workflows/publish.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Publish CI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: 12
15+
registry-url: https://registry.npmjs.org/
16+
- run: yarn install
17+
- run: npm publish --access public
18+
env:
19+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.github/workflows/test.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Test CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- uses: actions/setup-node@v1
11+
with:
12+
node-version: 12
13+
registry-url: https://registry.npmjs.org/
14+
- run: yarn install
15+
- run: yarn test

.gitignore

-6
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,3 @@ yarn.lock
3030
npm-debug.log*
3131
yarn-debug.log*
3232
yarn-error.log*
33-
34-
**/.DS_Store
35-
36-
.idea/
37-
.vscode/
38-
.vs/

.prettierrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
"bracketSpacing": true,
77
"jsxBracketSameLine": false,
88
"arrowParens": "always",
9-
"trailingComma": "none"
9+
"trailingComma": "none",
10+
"endOfLine":"auto"
1011
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const App = () => {
127127

128128
## Contribution
129129

130-
Please make sure to read the[ Contributing Guide](https://github.com/mxdi9i7/vant-react/blob/master/CONTRIBUTION.md) before making a pull request.
130+
Please make sure to read the[ Contributing Guide](.github/CONTRIBUTION.md) before making a pull request.
131131

132132
Or, join our discussion group on Wechat by adding me!
133133

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"test": "run-s test:unit test:lint test:build",
1919
"test:build": "run-s build",
2020
"test:lint": "eslint .",
21-
"test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
21+
"test:unit": "cross-env CI=1 react-scripts test --env=jsdom --passWithNoTests",
2222
"test:watch": "react-scripts test --env=jsdom",
2323
"predeploy": "cd example && yarn install && yarn run build",
2424
"deploy": "gh-pages -d example/build",

src/react-app-env.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="react-scripts" />

tsconfig.json

+21-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"compilerOptions": {
33
"outDir": "dist",
44
"module": "esnext",
5-
"lib": ["dom", "esnext"],
5+
"lib": [
6+
"dom",
7+
"esnext"
8+
],
69
"moduleResolution": "node",
710
"jsx": "react",
811
"sourceMap": true,
@@ -15,8 +18,22 @@
1518
"suppressImplicitAnyIndexErrors": true,
1619
"noUnusedLocals": true,
1720
"noUnusedParameters": true,
18-
"allowSyntheticDefaultImports": true
21+
"allowSyntheticDefaultImports": true,
22+
"target": "es5",
23+
"allowJs": true,
24+
"skipLibCheck": true,
25+
"strict": true,
26+
"forceConsistentCasingInFileNames": true,
27+
"resolveJsonModule": true,
28+
"isolatedModules": true,
29+
"noEmit": true
1930
},
20-
"include": ["src"],
21-
"exclude": ["node_modules", "dist", "demo"]
31+
"include": [
32+
"src"
33+
],
34+
"exclude": [
35+
"node_modules",
36+
"dist",
37+
"demo"
38+
]
2239
}

0 commit comments

Comments
 (0)