Skip to content

Commit

Permalink
switch to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
dumptyd committed Aug 31, 2024
1 parent a19e6ef commit 65e815a
Show file tree
Hide file tree
Showing 54 changed files with 9,399 additions and 12,900 deletions.
30 changes: 30 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution');

module.exports = {
root: true,
extends: [
'eslint:recommended',

'plugin:vue/vue3-essential',
'plugin:vue/vue3-strongly-recommended',
'plugin:vue/vue3-recommended',

'@vue/eslint-config-typescript',
'@vue/eslint-config-typescript/recommended',

'eslint-config-prettier',
'@vue/eslint-config-prettier',
],
parserOptions: {
ecmaVersion: 'latest',
},
overrides: [
{
files: ['*.html'],
rules: {
'vue/comment-directive': 'off',
},
},
],
};
91 changes: 0 additions & 91 deletions .eslintrc.json

This file was deleted.

20 changes: 10 additions & 10 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@ name: github-pages
on:
push:
branches:
- next
- master

jobs:
build-deploy:
name: Build and deploy the demo site to GitHub Pages
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4

- name: Use Node.js 12
uses: actions/setup-node@v2
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: '12'
node-version: 20
cache: 'npm'

- run: yarn install
- run: npm install

- name: Build
run: yarn build
run: npm run build:site

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
keep_files: true
publish_branch: gh-pages
publish_dir: ./docs
destination_dir: next
19 changes: 10 additions & 9 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@ on: [push, pull_request]
jobs:
lint_test_upload-coverage:
name: Lint, test and upload coverage
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Node.js 12
uses: actions/setup-node@v2
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: '12'
node-version: 20
cache: 'npm'

- run: yarn install
- run: npm install

- name: Check for lint errors
run: yarn lint --no-fix
- name: Check for linting errors
run: npm run lint

- name: Run tests
if: success()
run: yarn test:coverage
run: yarn test

- name: Upload coverage
if: success()
Expand Down
33 changes: 21 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
.DS_Store
node_modules
dist/
docs/
coverage/
docs

# local env files
.env.local
.env.*.local

# Log files
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
*.sw?

*.tsbuildinfo
39 changes: 24 additions & 15 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
.DS_Store
node_modules
dist/demo.html
docs/
coverage/
.github/
jest.config.js
tests/
docs
.github
tests
yarn.lock
dist/assets

# local env files
.env.local
.env.*.local

# Log files
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
*.sw?

*.tsbuildinfo
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.html
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"printWidth": 120
}
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@

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

## 2.1.0

- Rewrite in TypeScript. Types are included with the package.
- New prop `suppress-validation-warnings` to suppress warnings about invalid values.
- Less pedantic validation of certain props like `size`.
- `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.
- 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.

## 2.0.0

### Added
- Support for Vue 3

## 1.x

[Changelog for v1 (Vue 2)](https://github.com/dumptyd/vue-css-donut-chart/blob/master/CHANGELOG.md)
[Changelog for v1 (Vue 2)](https://github.com/dumptyd/vue-css-donut-chart/blob/legacy/CHANGELOG.md)
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 dumptyd
Copyright (c) 2018-2024 dumptyd

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

0 comments on commit 65e815a

Please sign in to comment.