Skip to content

Commit

Permalink
ci: fix pages deploy error, add umd outputs (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Aug 15, 2019
1 parent 8fc5733 commit 3fa6417
Show file tree
Hide file tree
Showing 6 changed files with 305 additions and 27 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.json
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
* text=auto
2 changes: 2 additions & 0 deletions .gitconfig
@@ -0,0 +1,2 @@
[core]
ignorecase = false
10 changes: 5 additions & 5 deletions .travis.yml
Expand Up @@ -22,24 +22,24 @@ before_script:
script:
- yarn lint
- yarn test
- rm -rf dist output
- yarn build:cjs
- yarn build:es
- yarn build:example --public-url /$TRAVIS_REPO_NAME/
- yarn build

after_success:
- yarn global add codecov
- codecov

before_deploy: yarn build:example --public-url /$TRAVIS_REPO_NAME/

deploy:
provider: pages
skip_cleanup: true
email: admin@1stg.me
name: JounQin
github_token: $GH_TOKEN
keep_history: true
allow_empty_commit: false
local_dir: output
on:
edge:
branch: master

after_script:
Expand Down
19 changes: 12 additions & 7 deletions package.json
Expand Up @@ -5,20 +5,24 @@
"license": "MIT",
"main": "dist/cjs",
"module": "dist/es",
"unpkg": "dist/umd",
"types": "dist/types",
"files": [
"dist"
],
"scripts": {
"dev": "parcel ./example/index.html --https",
"start": "yarn dev",
"serve": "serve output",
"build:cjs": "tsc -p src/tsconfig.cjs.json",
"build:es": "tsc -p src/tsconfig.es.json",
"build:example": "parcel build ./example/index.html -d output",
"build": "rimraf dist output && run-p build:*",
"build:umd": "cross-env NODE_ENV=development parcel build src/index.tsx -d dist/umd --global statedBean --no-minify",
"build:umd:min": "parcel build src/index.tsx -d dist/umd --global statedBean -o index.min.js",
"build:example": "parcel build ./example/index.html -d output --log-level 1",
"build": "rimraf dist output && run-p build:**",
"lint": "cross-env EFF_NO_LINK_RULES=true eslint . --ext .js,.ts,.tsx -f friendly",
"test": "jest --env=jsdom --coverage",
"type-coverage": "type-coverage --strict"
"type-coverage": "type-coverage --ignore-files dist --strict"
},
"peerDependencies": {
"react": ">=16.8.0"
Expand All @@ -29,8 +33,8 @@
"@types/enzyme": "^3.10.3",
"@types/enzyme-adapter-react-16": "^1.0.5",
"@types/jest": "^24.0.17",
"@types/node": "^12.7.1",
"@types/react": "^16.9.0",
"@types/node": "^12.7.2",
"@types/react": "^16.9.1",
"@types/react-dom": "^16.8.5",
"@types/react-test-renderer": "^16.9.0",
"commitlint": "^8.1.0",
Expand All @@ -50,7 +54,8 @@
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-test-renderer": "^16.9.0",
"rimraf": "^2.6.3",
"rimraf": "^3.0.0",
"serve": "^11.1.0",
"ts-jest": "^24.0.2",
"ts-node": "^8.3.0",
"tslib": "^1.10.0",
Expand All @@ -61,6 +66,6 @@
"stated-bean": "./src"
},
"typeCoverage": {
"atLeast": 92
"atLeast": 94
}
}

0 comments on commit 3fa6417

Please sign in to comment.