Skip to content

Commit

Permalink
feat(docs): semantic release and other CI integration
Browse files Browse the repository at this point in the history
  • Loading branch information
AngusFu committed Aug 20, 2018
1 parent 8226938 commit 549cfbd
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 18 deletions.
26 changes: 12 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
language: node_js
cache:
directories:
- ~/.npm
notifications:
email: false
node_js:
- 9
- 10
- '10'
- '9'

# S: Build Lifecycle
install:
- npm install

before_script:
- echo "start"

script:
- npm run lint
- npm run build

after_script:
- echo "done"
# E: Build LifeCycle

after_success:
- npm run travis-deploy-once "npm run semantic-release"
- npx gh-pages -r https://"$GH_TOKEN"@github.com/clair-design/clair-design.github.io.git -b master -d .site
branches:
only:
- master

env:
global:

cache:
directories:
# - node_modules
except:
- /^v\d+\.\d+\.\d+$/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ A design system including principles, Vue components and design resources.
## Document

- [clair.75team.com](https://clair.75team.com/) (recommended)
- [clair.surge.sh](https://clair.surge.sh/)
- [clair-design.github.io](https://clair-design.github.io)
42 changes: 39 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clair",
"version": "0.3.1",
"version": "0.3.2",
"description": "A design system including principles, Vue components and resources",
"main": "dist/clair.cjs.js",
"module": "dist/clair.es.js",
Expand All @@ -20,7 +20,10 @@
"build": "run-s clean doc:build bundle rawcss",
"start": "npm run doc:dev",
"lint": "eslint -f node_modules/eslint-friendly-formatter --ext .js,.vue src docs",
"rawcss": "postcss --no-map -u postcss-easy-import -u postcss-each -u postcss-for -o dist/clair.raw.css src/styles/raw.css"
"rawcss": "postcss --no-map -u postcss-easy-import -u postcss-each -u postcss-for -o dist/clair.raw.css src/styles/raw.css",
"travis-deploy-once": "travis-deploy-once",
"semantic-release": "semantic-release",
"cz": "git-cz"
},
"lint-staged": {
"*.css": [
Expand All @@ -35,7 +38,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/clair-design/clair.git"
"url": "https://github.com/clair-design/clair.git"
},
"keywords": [
"Design",
Expand All @@ -49,12 +52,19 @@
},
"homepage": "https://github.com/clair-design/clair#readme",
"devDependencies": {
"@semantic-release/changelog": "^3.0.0",
"@semantic-release/git": "^7.0.1",
"@semantic-release/github": "^5.0.2",
"@semantic-release/npm": "^5.0.2",
"@vue/test-utils": "^1.0.0-beta.11",
"cili": "^3.1.2",
"commitizen": "^2.10.1",
"cross-env": "^5.1.1",
"cz-conventional-changelog": "^2.1.0",
"eslint": "^5.3.0",
"eslint-config-clair": "^1.0.0",
"eslint-friendly-formatter": "^3.0.0",
"gh-pages": "^1.2.0",
"husky": "^0.14.3",
"jest": "^22.1.2",
"lint-staged": "^4.0.2",
Expand All @@ -70,8 +80,10 @@
"rimraf": "^2.6.2",
"rollup-plugin-require-context": "^0.0.2",
"rollup-plugin-vue": "3.0.0",
"semantic-release": "^15.9.9",
"stylelint": "^8.3.1",
"stylelint-config-standard": "^17.0.0",
"travis-deploy-once": "^5.0.2",
"vue-jest": "^1.4.0"
},
"dependencies": {
Expand All @@ -83,5 +95,29 @@
},
"peerDependencies": {
"vue": "^2.5.16"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"release": {
"noCi": true,
"prepare": [
"@semantic-release/changelog",
"@semantic-release/npm",
{
"path": "@semantic-release/git",
"assets": [
"package.json",
"CHANGELOG.md"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"publish": [
"@semantic-release/npm",
"@semantic-release/github"
]
}
}

0 comments on commit 549cfbd

Please sign in to comment.