Skip to content

Commit 4b969d8

Browse files
committed
initial commit
0 parents  commit 4b969d8

17 files changed

+4369
-0
lines changed

.editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
charset = utf-8
8+
9+
[*.js]
10+
indent_style = space
11+
indent_size = 2
12+
13+
[{package.json,*.yml,*.cjson}]
14+
indent_style = space
15+
indent_size = 2

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
coverage
3+
dist

.eslintrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": ["eslint-config-unjs"],
3+
"rules": {
4+
"@typescript-eslint/no-non-null-assertion": "off"
5+
}
6+
}

.github/workflows/ci.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
ci:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- run: corepack enable
17+
- uses: actions/setup-node@v3
18+
with:
19+
node-version: 18
20+
cache: "pnpm"
21+
- run: pnpm install
22+
- run: pnpm lint
23+
- run: pnpm build
24+
- run: pnpm vitest --coverage
25+
- uses: codecov/codecov-action@v3

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules
2+
coverage
3+
dist
4+
types
5+
.vscode
6+
.DS_Store
7+
.eslintcache
8+
*.log*
9+
*.conf*
10+
*.env*

.prettierrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c)
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

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# vite-plugin-vue-nested-sfc
2+
3+
[![npm version][npm-version-src]][npm-version-href]
4+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
5+
[![build][build-src]][build-href]
6+
[![License][license-src]][license-href]
7+
8+
Nest SFCs within your SFC.
9+
10+
## Usage
11+
12+
Install package:
13+
14+
```sh
15+
# npm
16+
npm install -D vite-plugin-vue-nested-sfc
17+
18+
# yarn
19+
yarn add -D vite-plugin-vue-nested-sfc
20+
21+
# pnpm
22+
pnpm add -D vite-plugin-vue-nested-sfc
23+
```
24+
25+
Add to vite config:
26+
27+
```js
28+
// vite.config.js
29+
import vue from "@vitejs/plugin-vue";
30+
import vueNestedSFC from "vite-plugin-vue-nested-sfc";
31+
32+
export default {
33+
plugins: [vue(), vueNestedSFC()],
34+
};
35+
```
36+
37+
## License
38+
39+
Made with 💛
40+
41+
Published under [MIT License](./LICENSE).
42+
43+
<!-- Badges -->
44+
45+
[npm-version-src]: https://img.shields.io/npm/v/vite-plugin-vue-nested-sfc?style=flat&colorA=18181B&colorB=F0DB4F
46+
[npm-version-href]: https://npmjs.com/package/vite-plugin-vue-nested-sfc
47+
[npm-downloads-src]: https://img.shields.io/npm/dm/vite-plugin-vue-nested-sfc?style=flat&colorA=18181B&colorB=F0DB4F
48+
[npm-downloads-href]: https://npmjs.com/package/vite-plugin-vue-nested-sfc
49+
[build-src]: https://github.com/HunYan-io/vite-plugin-vue-nested-sfc/actions/workflows/ci.yml/badge.svg?branch=main
50+
[build-href]: https://github.com/HunYan-io/vite-plugin-vue-nested-sfc/actions/workflows/ci.yml
51+
[license-src]: https://img.shields.io/github/license/HunYan-io/vite-plugin-vue-nested-sfc.svg?style=flat&colorA=18181B&colorB=F0DB4F
52+
[license-href]: https://github.com/HunYan-io/vite-plugin-vue-nested-sfc/blob/main/LICENSE

package.json

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "vite-plugin-vue-nested-sfc",
3+
"version": "0.0.0",
4+
"description": "",
5+
"repository": "HunYan-io/vite-plugin-vue-nested-sfc",
6+
"license": "MIT",
7+
"sideEffects": false,
8+
"type": "module",
9+
"exports": {
10+
".": {
11+
"types": "./dist/index.d.ts",
12+
"import": "./dist/index.mjs",
13+
"require": "./dist/index.cjs"
14+
}
15+
},
16+
"main": "./dist/index.cjs",
17+
"module": "./dist/index.mjs",
18+
"types": "./dist/index.d.ts",
19+
"files": [
20+
"dist"
21+
],
22+
"scripts": {
23+
"build": "unbuild",
24+
"dev": "vitest dev",
25+
"lint": "eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test",
26+
"lint:fix": "eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w",
27+
"prepack": "pnpm run build",
28+
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags",
29+
"test": "pnpm lint && vitest run --coverage"
30+
},
31+
"devDependencies": {
32+
"@vitejs/plugin-vue": "^4.1.0",
33+
"@vitest/coverage-c8": "^0.29.7",
34+
"changelogen": "^0.5.1",
35+
"eslint": "^8.36.0",
36+
"eslint-config-unjs": "^0.1.0",
37+
"prettier": "^2.8.5",
38+
"typescript": "^4.9.5",
39+
"unbuild": "^1.1.2",
40+
"vite": "^4.2.1",
41+
"vitest": "^0.29.7",
42+
"vue": "^3.2.47"
43+
},
44+
"peerDependencies": {
45+
"@vitejs/plugin-vue": "^4.0.0",
46+
"vite": "^4.0.0",
47+
"vue": "^3.2.25"
48+
},
49+
"packageManager": "[email protected]"
50+
}

0 commit comments

Comments
 (0)