Skip to content

Commit e9c0084

Browse files
committed
feat: init
0 parents  commit e9c0084

31 files changed

+4994
-0
lines changed

.editorconfig

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
root = true
2+
3+
[*]
4+
indent_size = 2
5+
end_of_line = lf
6+
insert_final_newline = true

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
pnpm-lock.yaml
4+
tests/fixtures

.eslintrc.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const { defineConfig } = require('eslint-define-config')
2+
3+
module.exports = defineConfig({
4+
root: true,
5+
extends: ['@sxzz'],
6+
rules: {
7+
'unicorn/prefer-string-replace-all': 'off',
8+
},
9+
})

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: sxzz

.github/renovate.json5

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
extends: ['config:base', 'schedule:weekly', 'group:allNonMajor'],
3+
labels: ['dependencies'],
4+
pin: false,
5+
rangeStrategy: 'bump',
6+
node: false,
7+
packageRules: [
8+
{
9+
depTypeList: ['peerDependencies'],
10+
enabled: false,
11+
},
12+
],
13+
ignoreDeps: ['node'],
14+
}

.github/workflows/release.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Set node
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 16.x
20+
21+
- run: npx changelogithub
22+
env:
23+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/unit-test.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Unit Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set node
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: 16.x
18+
19+
- name: Setup
20+
run: npm i -g @antfu/ni
21+
22+
- name: Install
23+
run: nci
24+
25+
- name: Lint
26+
run: nr lint
27+
28+
test:
29+
runs-on: ${{ matrix.os }}
30+
31+
strategy:
32+
matrix:
33+
os: [ubuntu-latest, windows-latest]
34+
node: [14.19.0, 16.x, 18]
35+
fail-fast: false
36+
37+
steps:
38+
- uses: actions/checkout@v3
39+
- name: Set node ${{ matrix.node }}
40+
uses: actions/setup-node@v3
41+
with:
42+
node-version: ${{ matrix.node }}
43+
44+
- name: Setup
45+
run: npm i -g @antfu/ni
46+
47+
- name: Install
48+
run: nci
49+
50+
- name: Build
51+
run: nr build
52+
53+
- name: Test
54+
run: nr test

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
*.log
5+
.vercel

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+
pnpm-lock.yaml

.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "http://json.schemastore.org/prettierrc",
3+
"semi": false,
4+
"singleQuote": true
5+
}

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"editor.formatOnSave": true
3+
}

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright © 2023-PRESENT 三咲智子 (https://github.com/sxzz)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# unplugin-vue-named-export [![npm](https://img.shields.io/npm/v/unplugin-vue-named-export.svg)](https://npmjs.com/package/unplugin-vue-named-export)
2+
3+
[![Unit Test](https://github.com/sxzz/unplugin-vue-named-export/actions/workflows/unit-test.yml/badge.svg)](https://github.com/sxzz/unplugin-vue-named-export/actions/workflows/unit-test.yml)
4+
5+
Named export for Vue SFC.
6+
7+
## Installation
8+
9+
```bash
10+
npm i unplugin-vue-named-export
11+
```
12+
13+
<details>
14+
<summary>Vite</summary><br>
15+
16+
```ts
17+
// vite.config.ts
18+
import VueNamedExport from 'unplugin-vue-named-export/vite'
19+
20+
export default defineConfig({
21+
plugins: [VueNamedExport()],
22+
})
23+
```
24+
25+
<br></details>
26+
27+
<details>
28+
<summary>Rollup</summary><br>
29+
30+
```ts
31+
// rollup.config.js
32+
import VueNamedExport from 'unplugin-vue-named-export/rollup'
33+
34+
export default {
35+
plugins: [VueNamedExport()],
36+
}
37+
```
38+
39+
<br></details>
40+
41+
<details>
42+
<summary>esbuild</summary><br>
43+
44+
```ts
45+
// esbuild.config.js
46+
import { build } from 'esbuild'
47+
48+
build({
49+
plugins: [require('unplugin-vue-named-export/esbuild')()],
50+
})
51+
```
52+
53+
<br></details>
54+
55+
<details>
56+
<summary>Webpack</summary><br>
57+
58+
```ts
59+
// webpack.config.js
60+
module.exports = {
61+
/* ... */
62+
plugins: [require('unplugin-vue-named-export/webpack')()],
63+
}
64+
```
65+
66+
<br></details>
67+
68+
<details>
69+
<summary>Vue CLI</summary><br>
70+
71+
```ts
72+
// vue.config.js
73+
module.exports = {
74+
configureWebpack: {
75+
plugins: [require('unplugin-vue-named-export/webpack')()],
76+
},
77+
}
78+
```
79+
80+
<br></details>
81+
82+
## Sponsors
83+
84+
<p align="center">
85+
<a href="https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg">
86+
<img src='https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg'/>
87+
</a>
88+
</p>
89+
90+
## License
91+
92+
[MIT](./LICENSE) License © 2022 [三咲智子](https://github.com/sxzz)

package.json

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
{
2+
"name": "unplugin-vue-named-export",
3+
"version": "0.0.0",
4+
"packageManager": "[email protected]",
5+
"description": "Named export for Vue SFC.",
6+
"keywords": [
7+
"unplugin",
8+
"rollup",
9+
"vite",
10+
"esbuild",
11+
"webpack"
12+
],
13+
"license": "MIT",
14+
"homepage": "https://github.com/sxzz/unplugin-vue-named-export#readme",
15+
"bugs": {
16+
"url": "https://github.com/sxzz/unplugin-vue-named-export/issues"
17+
},
18+
"repository": {
19+
"type": "git",
20+
"url": "git+https://github.com/sxzz/unplugin-vue-named-export.git"
21+
},
22+
"author": "三咲智子 <[email protected]>",
23+
"files": [
24+
"dist"
25+
],
26+
"main": "./dist/index.js",
27+
"module": "./dist/index.mjs",
28+
"types": "./dist/index.d.ts",
29+
"exports": {
30+
".": {
31+
"types": "./dist/index.d.ts",
32+
"require": "./dist/index.js",
33+
"import": "./dist/index.mjs"
34+
},
35+
"./vite": {
36+
"types": "./dist/vite.d.ts",
37+
"require": "./dist/vite.js",
38+
"import": "./dist/vite.mjs"
39+
},
40+
"./webpack": {
41+
"types": "./dist/webpack.d.ts",
42+
"require": "./dist/webpack.js",
43+
"import": "./dist/webpack.mjs"
44+
},
45+
"./rollup": {
46+
"types": "./dist/rollup.d.ts",
47+
"require": "./dist/rollup.js",
48+
"import": "./dist/rollup.mjs"
49+
},
50+
"./esbuild": {
51+
"types": "./dist/esbuild.d.ts",
52+
"require": "./dist/esbuild.js",
53+
"import": "./dist/esbuild.mjs"
54+
},
55+
"./*": "./*"
56+
},
57+
"typesVersions": {
58+
"<=4.9": {
59+
"*": [
60+
"./dist/*",
61+
"./*"
62+
]
63+
}
64+
},
65+
"publishConfig": {
66+
"access": "public"
67+
},
68+
"scripts": {
69+
"lint": "eslint . --ext .vue,.js,.ts,.jsx,.tsx,.json,.md",
70+
"lint:fix": "pnpm run lint --fix",
71+
"build": "tsup && tsx scripts/postbuild.mts",
72+
"dev": "tsup --watch",
73+
"test": "vitest",
74+
"release": "bumpp && pnpm publish",
75+
"prepublishOnly": "pnpm run build"
76+
},
77+
"dependencies": {
78+
"@rollup/pluginutils": "^5.0.2",
79+
"@vue-macros/common": "^1.1.1",
80+
"change-case": "^4.1.2",
81+
"magic-string": "^0.30.0",
82+
"unplugin": "^1.1.0"
83+
},
84+
"devDependencies": {
85+
"@babel/types": "^7.21.2",
86+
"@sxzz/eslint-config": "^2.4.5",
87+
"@types/node": "^18.14.6",
88+
"@vue-macros/test-utils": "^1.0.0",
89+
"bumpp": "^9.0.0",
90+
"eslint": "^8.35.0",
91+
"eslint-define-config": "^1.16.0",
92+
"fast-glob": "^3.2.12",
93+
"prettier": "^2.8.4",
94+
"rollup": "^3.18.0",
95+
"tsup": "^6.6.3",
96+
"tsx": "^3.12.3",
97+
"typescript": "^5.0.0-beta",
98+
"vite": "^4.1.4",
99+
"vitest": "^0.29.2",
100+
"vue": "^3.2.47"
101+
},
102+
"engines": {
103+
"node": ">=14.19.0"
104+
}
105+
}

0 commit comments

Comments
 (0)