Skip to content

Commit 96d18c7

Browse files
committed
switch to typescript
1 parent a19e6ef commit 96d18c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+9400
-12901
lines changed

.eslintrc.cjs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/* eslint-env node */
2+
require('@rushstack/eslint-patch/modern-module-resolution');
3+
4+
module.exports = {
5+
root: true,
6+
extends: [
7+
'eslint:recommended',
8+
9+
'plugin:vue/vue3-essential',
10+
'plugin:vue/vue3-strongly-recommended',
11+
'plugin:vue/vue3-recommended',
12+
13+
'@vue/eslint-config-typescript',
14+
'@vue/eslint-config-typescript/recommended',
15+
16+
'eslint-config-prettier',
17+
'@vue/eslint-config-prettier',
18+
],
19+
parserOptions: {
20+
ecmaVersion: 'latest',
21+
},
22+
overrides: [
23+
{
24+
files: ['*.html'],
25+
rules: {
26+
'vue/comment-directive': 'off',
27+
},
28+
},
29+
],
30+
};

.eslintrc.json

Lines changed: 0 additions & 91 deletions
This file was deleted.

.github/workflows/gh-pages.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,30 @@ name: github-pages
33
on:
44
push:
55
branches:
6-
- next
6+
- master
77

88
jobs:
99
build-deploy:
1010
name: Build and deploy the demo site to GitHub Pages
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-22.04
1212
steps:
13-
- uses: actions/checkout@master
13+
- uses: actions/checkout@v4
1414

15-
- name: Use Node.js 12
16-
uses: actions/setup-node@v2
15+
- name: Use Node.js 20
16+
uses: actions/setup-node@v4
1717
with:
18-
node-version: '12'
18+
node-version: 20
19+
cache: 'npm'
1920

20-
- run: yarn install
21+
- run: npm install
2122

2223
- name: Build
23-
run: yarn build
24+
run: npm run build:site
2425

2526
- name: Deploy
26-
uses: peaceiris/actions-gh-pages@v3
27+
uses: peaceiris/actions-gh-pages@v4
2728
with:
2829
github_token: ${{ secrets.GITHUB_TOKEN }}
2930
keep_files: true
3031
publish_branch: gh-pages
31-
publish_dir: ./docs
32-
destination_dir: next
32+
publish_dir: ./dist

.github/workflows/tests.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,24 @@ on: [push, pull_request]
33
jobs:
44
lint_test_upload-coverage:
55
name: Lint, test and upload coverage
6-
runs-on: ubuntu-20.04
6+
runs-on: ubuntu-22.04
77
steps:
8-
- uses: actions/checkout@v2
8+
- uses: actions/checkout@v4
99

10-
- name: Use Node.js 12
11-
uses: actions/setup-node@v2
10+
- name: Use Node.js 20
11+
uses: actions/setup-node@v4
1212
with:
13-
node-version: '12'
13+
node-version: 20
14+
cache: 'npm'
1415

15-
- run: yarn install
16+
- run: npm install
1617

17-
- name: Check for lint errors
18-
run: yarn lint --no-fix
18+
- name: Check for linting errors
19+
run: npm run lint
1920

2021
- name: Run tests
2122
if: success()
22-
run: yarn test:coverage
23+
run: yarn test
2324

2425
- name: Upload coverage
2526
if: success()

.gitignore

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
1-
.DS_Store
2-
node_modules
3-
dist/
4-
docs/
5-
coverage/
1+
docs
62

7-
# local env files
8-
.env.local
9-
.env.*.local
10-
11-
# Log files
3+
# Logs
4+
logs
5+
*.log
126
npm-debug.log*
137
yarn-debug.log*
148
yarn-error.log*
9+
pnpm-debug.log*
10+
lerna-debug.log*
11+
12+
node_modules
13+
.DS_Store
14+
dist
15+
dist-ssr
16+
coverage
17+
*.local
18+
19+
/cypress/videos/
20+
/cypress/screenshots/
1521

1622
# Editor directories and files
23+
.vscode/*
24+
!.vscode/extensions.json
1725
.idea
18-
.vscode
1926
*.suo
2027
*.ntvs*
2128
*.njsproj
2229
*.sln
23-
*.sw*
30+
*.sw?
31+
32+
*.tsbuildinfo

.npmignore

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,36 @@
1-
.DS_Store
2-
node_modules
3-
dist/demo.html
4-
docs/
5-
coverage/
6-
.github/
7-
jest.config.js
8-
tests/
1+
docs
2+
.github
3+
tests
94
yarn.lock
5+
dist/assets
106

11-
# local env files
12-
.env.local
13-
.env.*.local
14-
15-
# Log files
7+
# Logs
8+
logs
9+
*.log
1610
npm-debug.log*
1711
yarn-debug.log*
1812
yarn-error.log*
13+
pnpm-debug.log*
14+
lerna-debug.log*
15+
16+
node_modules
17+
.DS_Store
18+
dist
19+
dist-ssr
20+
coverage
21+
*.local
22+
23+
/cypress/videos/
24+
/cypress/screenshots/
1925

2026
# Editor directories and files
27+
.vscode/*
28+
!.vscode/extensions.json
2129
.idea
22-
.vscode
2330
*.suo
2431
*.ntvs*
2532
*.njsproj
2633
*.sln
27-
*.sw*
34+
*.sw?
35+
36+
*.tsbuildinfo

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.html

.prettierrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"singleQuote": true,
4+
"semi": true,
5+
"tabWidth": 2,
6+
"printWidth": 120
7+
}

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22

33
All notable changes to v2 will be documented in this file.
44

5+
## 2.1.0
6+
7+
- Rewrite in TypeScript. Types are included with the package.
8+
- New prop `suppress-validation-warnings` to suppress warnings about invalid values.
9+
- Less pedantic validation of certain props like `size`.
10+
- `auto-adjust-text-size` now uses ResizeObserver instead of window resize event. This will allow for more accurate text size adjustments when the component is resized dynamically.
11+
- Source maps are now included with the package. *.min.js files are still included for backwards compatibility but they are just a copy of their *.js counterparts.
12+
513
## 2.0.0
614

715
### Added
816
- Support for Vue 3
917

1018
## 1.x
1119

12-
[Changelog for v1 (Vue 2)](https://github.com/dumptyd/vue-css-donut-chart/blob/master/CHANGELOG.md)
20+
[Changelog for v1 (Vue 2)](https://github.com/dumptyd/vue-css-donut-chart/blob/legacy/CHANGELOG.md)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 dumptyd
3+
Copyright (c) 2018-2024 dumptyd
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)