Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed May 1, 2024
1 parent e0d37b0 commit ecf1a68
Show file tree
Hide file tree
Showing 34 changed files with 8,350 additions and 7,427 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

6 changes: 0 additions & 6 deletions .eslintrc.json

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: lts/*

Expand All @@ -36,15 +36,15 @@ jobs:

strategy:
matrix:
node: [16.x, 18.x]
node: [lts/*]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set node version to ${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: lts/*

Expand Down
44 changes: 43 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,46 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"prettier.enable": false

// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,

// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off" },
{ "rule": "format/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],

// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"toml",
"astro"
]
}
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export default {

<br></details>


<details>
<summary>Webpack</summary><br>

Expand Down Expand Up @@ -117,6 +116,7 @@ module.exports = {
```

You can also rename the Vue configuration file to `vue.config.mjs` and use static import syntax (you should use latest `@vue/cli-service ^5.0.8`):

```ts
// vue.config.mjs
import Components from 'unplugin-vue-components/webpack'
Expand Down Expand Up @@ -166,9 +166,9 @@ It will automatically turn this
</template>

<script>
export default {
name: 'App'
}
export default {
name: 'App',
}
</script>
```

Expand All @@ -182,16 +182,17 @@ into this
</template>

<script>
import HelloWorld from './src/components/HelloWorld.vue'
import HelloWorld from './src/components/HelloWorld.vue'
export default {
name: 'App',
components: {
HelloWorld
export default {
name: 'App',
components: {
HelloWorld,
},
}
}
</script>
```

> **Note**
> By default this plugin will import components in the `src/components` path. You can customize it using the `dirs` option.
Expand Down
6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import antfu from '@antfu/eslint-config'

export default antfu({
formatters: true,
vue: true,
})
20 changes: 10 additions & 10 deletions examples/vite-vue2/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
7 changes: 4 additions & 3 deletions examples/vite-vue2/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"name": "example-vite-vue2",
"private": true,
"scripts": {
"build": "cross-env DEBUG=unplugin-vue-components:* vite build",
"dev": "cross-env DEBUG=unplugin-vue-components:* vite"
},
"dependencies": {
"vue": "^2.7.14"
"vue": "^2.7.16"
},
"devDependencies": {
"@vitejs/plugin-vue2": "^2.2.0",
"@vitejs/plugin-vue2": "^2.3.1",
"cross-env": "^7.0.3",
"unplugin-vue-components": "workspace:*",
"vite": "^4.4.9"
"vite": "^5.2.10"
}
}
20 changes: 10 additions & 10 deletions examples/vite-vue3/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
20 changes: 10 additions & 10 deletions examples/vite-vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
"preview": "cross-env DEBUG=unplugin-vue-components:* vite preview"
},
"dependencies": {
"vant": "^4.6.8"
"vant": "^4.8.11"
},
"devDependencies": {
"@iconify/json": "^2.2.115",
"@vitejs/plugin-vue": "^4.3.4",
"@vue/compiler-sfc": "^3.3.4",
"@iconify/json": "^2.2.205",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/compiler-sfc": "^3.4.26",
"cross-env": "^7.0.3",
"has-pkg": "^0.0.1",
"typescript": "^5.2.2",
"unplugin-icons": "^0.17.0",
"typescript": "^5.4.5",
"unplugin-icons": "^0.18.5",
"unplugin-vue-components": "workspace:*",
"vite": "^4.4.9",
"vite-plugin-inspect": "^0.7.38",
"vite-plugin-vue-markdown": "^0.23.8",
"vue-router": "^4.2.4"
"unplugin-vue-markdown": "^0.26.2",
"vite": "^5.2.10",
"vite-plugin-inspect": "^0.8.4",
"vue-router": "^4.3.2"
}
}
2 changes: 2 additions & 0 deletions examples/vite-vue3/src/shims-vue.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
declare module '*.vue' {
import type { defineComponent } from 'vue'

const Component: ReturnType<typeof defineComponent>
export default Component
}

declare module '*.md' {
import type { defineComponent } from 'vue'

const Component: ReturnType<typeof defineComponent>
export default Component
}
6 changes: 3 additions & 3 deletions examples/vue-cli-vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.32.2",
"vue": "^3.2.45"
"core-js": "^3.37.0",
"vue": "^3.4.26"
},
"devDependencies": {
"@babel/core": "^7.22.17",
"@babel/core": "^7.24.5",
"@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-service": "~5.0.8",
"unplugin-vue-components": "workspace:*"
Expand Down
14 changes: 9 additions & 5 deletions examples/vue-cli-vue3/public/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<!DOCTYPE html>
<!doctype html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
<strong
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
properly without JavaScript enabled. Please enable it to
continue.</strong
>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
Expand Down
8 changes: 4 additions & 4 deletions examples/vue-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
},
"dependencies": {
"@vue/composition-api": "^1.7.2",
"core-js": "^3.32.2",
"vue": "^3.2.45"
"core-js": "^3.37.0",
"vue": "^3.4.26"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-plugin-typescript": "^5.0.8",
"@vue/cli-service": "^5.0.8",
"typescript": "^5.2.2",
"unplugin-icons": "^0.17.0",
"typescript": "^5.4.5",
"unplugin-icons": "^0.18.5",
"unplugin-vue-components": "workspace:*",
"unplugin-vue2-script-setup": "^0.11.4"
}
Expand Down
14 changes: 9 additions & 5 deletions examples/vue-cli/public/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<!DOCTYPE html>
<!doctype html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
<strong
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
properly without JavaScript enabled. Please enable it to
continue.</strong
>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
Expand Down

0 comments on commit ecf1a68

Please sign in to comment.