Skip to content

Commit

Permalink
Merge pull request #646 from uiv-lib/dev
Browse files Browse the repository at this point in the history
v1
  • Loading branch information
wxsms committed Nov 13, 2021
2 parents 70873aa + 6360159 commit 3364364
Show file tree
Hide file tree
Showing 364 changed files with 37,058 additions and 15,360 deletions.
24 changes: 24 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"presets": [
[
"env",
{
"modules": false
}
]
],
"env": {
"test": {
"presets": [
[
"env",
{
"targets": {
"node": "current"
}
}
]
]
}
}
}
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.md
docs/.vuepress/dist
17 changes: 9 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@
module.exports = {
root: true,
env: {
browser: true
browser: true,
},
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
extends: ['standard', 'plugin:vue/base'],
extends: ['plugin:vue/recommended', 'plugin:prettier/recommended'],
// required to lint *.vue files
plugins: [
'html'
],
plugins: ['html'],

// add your custom rules here
'rules': {
rules: {
// allow paren-less arrow functions
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'no-unused-expressions': 0
}
'no-unused-expressions': 0,
'vue/multi-word-component-names': 0,
'vue/no-v-html': 0,
},
}
10 changes: 10 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"extends": [
"config:base"
],
"packageRules": [
{
"matchUpdateTypes": [
"minor",
"patch"
],
"matchCurrentVersion": "!/^0/",
"automerge": true
}
]
}
48 changes: 29 additions & 19 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,52 @@
name: CI
name: lint and test

on:
push:
branches:
- dev
pull_request:
branches:
- dev
- push
- pull_request

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- run: yarn --frozen-lockfile
- uses: pnpm/action-setup@v2.0.1
with:
version: latest
- run: pnpm i --frozen-lockfile
- name: Lint
run: npm run lint
run: pnpm run lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- run: yarn --frozen-lockfile
- name: Unit tests
uses: ianwalter/puppeteer-container@v4.0.0
- uses: pnpm/action-setup@v2.0.1
with:
args: npm run test
version: latest
- run: pnpm i --frozen-lockfile
- name: Unit tests
run: pnpm run test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./test/coverage/lcov.info
path-to-lcov: ./coverage/lcov.info
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- run: yarn --frozen-lockfile
- uses: pnpm/action-setup@v2.0.1
with:
version: latest
- run: pnpm i --frozen-lockfile
- name: Build dist
run: pnpm run dist
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.0.1
with:
version: latest
- run: pnpm i --frozen-lockfile
- name: Build dist
run: npm run dist
run: pnpm run docs:build
29 changes: 29 additions & 0 deletions .github/workflows/publish_doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: publish doc

on:
push:
branches:
- dev

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: dev
- uses: pnpm/action-setup@v2.0.1
with:
version: latest
- run: pnpm i --frozen-lockfile
- name: Build
run: pnpm run docs:build
- name: GitHub Pages
uses: crazy-max/ghaction-github-pages@v2.5.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target_branch: gh-pages
build_dir: docs/.vuepress/dist
jekyll: false
29 changes: 29 additions & 0 deletions .github/workflows/publish_github.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: publish github

on:
push:
tags:
- 'v*'

jobs:
publish_github:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2
with:
node-version: 12
- uses: actions/checkout@v2
- name: change package name
uses: deef0000dragon1/json-edit-action@v1
env:
KEY: name
VALUE: "@uiv-lib/uiv"
FILE: package.json
- uses: pnpm/action-setup@v2.0.1
with:
version: latest
- run: pnpm i --frozen-lockfile
- name: Build dist
run: pnpm run dist
- run: echo //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }} >> .npmrc
- run: npm publish --registry=https://npm.pkg.github.com
26 changes: 26 additions & 0 deletions .github/workflows/publish_npm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: publish npm

on:
push:
tags:
- 'v*'

jobs:
deploy_npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v2.0.1
with:
version: latest
- run: pnpm i --frozen-lockfile
- name: Build dist
run: pnpm run dist
- name: Publish NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,41 +1,29 @@
name: CD
name: publish release

on:
push:
tags:
- 'v*'

jobs:
deploy_npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn --frozen-lockfile
- name: Build dist
run: npm run dist
- name: Publish NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
deploy_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: dev
- uses: c-hive/gha-yarn-cache@v1
- run: yarn --frozen-lockfile
- uses: pnpm/action-setup@v2.0.1
with:
version: latest
- run: pnpm i --frozen-lockfile
- name: Build dist
run: npm run dist
run: pnpm run dist
- name: Changelog
uses: scottbrenner/generate-changelog-action@master
id: Changelog
with:
exclude: chore
env:
REPO: ${{ github.repository }}
- name: Create Release
Expand Down
11 changes: 3 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
.DS_Store
node_modules/
npm-debug.log
yarn-error.log
test/coverage
test/e2e/reports
selenium-debug.log
*.iml
.idea/
*.log
coverage
*.gz
dist-docs/
dist/
dist/
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/jsLinters/eslint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/uiv.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions .npmignore

This file was deleted.

5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"singleQuote": true,
"endOfLine": "auto"
}
Loading

0 comments on commit 3364364

Please sign in to comment.