suncy-my-npm-test 1.0.45 → 1.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -0
- package/dist/favicon.ico +0 -0
- package/dist/static/index.html +11 -0
- package/dist/suncy-my-npm-test.css +1 -0
- package/dist/suncy-my-npm-test.es.js +45 -0
- package/dist/suncy-my-npm-test.umd.js +1 -0
- package/package.json +59 -56
- package/packages/components/MyButton.vue +0 -76
- package/packages/index.js +0 -27
package/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# my-vue-project
|
|
2
|
+
|
|
3
|
+
This template should help get you started developing with Vue 3 in Vite.
|
|
4
|
+
|
|
5
|
+
## Recommended IDE Setup
|
|
6
|
+
|
|
7
|
+
[VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
|
|
8
|
+
|
|
9
|
+
## Recommended Browser Setup
|
|
10
|
+
|
|
11
|
+
- Chromium-based browsers (Chrome, Edge, Brave, etc.):
|
|
12
|
+
- [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
|
|
13
|
+
- [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
|
|
14
|
+
- Firefox:
|
|
15
|
+
- [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
|
|
16
|
+
- [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
|
|
17
|
+
|
|
18
|
+
## Type Support for `.vue` Imports in TS
|
|
19
|
+
|
|
20
|
+
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
|
|
21
|
+
|
|
22
|
+
## Customize configuration
|
|
23
|
+
|
|
24
|
+
See [Vite Configuration Reference](https://vite.dev/config/).
|
|
25
|
+
|
|
26
|
+
## Project Setup
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
npm install
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Compile and Hot-Reload for Development
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npm run dev
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Type-Check, Compile and Minify for Production
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
npm run build
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Lint with [ESLint](https://eslint.org/)
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
npm run lint
|
|
48
|
+
```
|
package/dist/favicon.ico
ADDED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1[data-v-6cb782b8]{font-weight:500;font-size:2.6rem;position:relative;top:-10px}h3[data-v-6cb782b8]{font-size:1.2rem}.greetings h1[data-v-6cb782b8],.greetings h3[data-v-6cb782b8]{text-align:center}@media(min-width:1024px){.greetings h1[data-v-6cb782b8],.greetings h3[data-v-6cb782b8]{text-align:left}}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineComponent as a, openBlock as c, createElementBlock as i, createElementVNode as o, toDisplayString as p, createTextVNode as n } from "vue";
|
|
2
|
+
const d = { class: "greetings" }, _ = { class: "green" }, m = /* @__PURE__ */ a({
|
|
3
|
+
__name: "HelloWorld",
|
|
4
|
+
props: {
|
|
5
|
+
msg: {}
|
|
6
|
+
},
|
|
7
|
+
setup(t) {
|
|
8
|
+
return (r, e) => (c(), i("div", d, [
|
|
9
|
+
o("h1", _, p(t.msg), 1),
|
|
10
|
+
e[0] || (e[0] = o("h3", null, [
|
|
11
|
+
n(" You’ve successfully created a project with "),
|
|
12
|
+
o("a", {
|
|
13
|
+
href: "https://vite.dev/",
|
|
14
|
+
target: "_blank",
|
|
15
|
+
rel: "noopener"
|
|
16
|
+
}, "Vite"),
|
|
17
|
+
n(" + "),
|
|
18
|
+
o("a", {
|
|
19
|
+
href: "https://vuejs.org/",
|
|
20
|
+
target: "_blank",
|
|
21
|
+
rel: "noopener"
|
|
22
|
+
}, "Vue 3"),
|
|
23
|
+
n(". What's next? ")
|
|
24
|
+
], -1)),
|
|
25
|
+
e[1] || (e[1] = o("iframe", {
|
|
26
|
+
src: "/static/index.html",
|
|
27
|
+
width: "100%",
|
|
28
|
+
height: "400px"
|
|
29
|
+
}, null, -1))
|
|
30
|
+
]));
|
|
31
|
+
}
|
|
32
|
+
}), u = (t, r) => {
|
|
33
|
+
const e = t.__vccOpts || t;
|
|
34
|
+
for (const [s, l] of r)
|
|
35
|
+
e[s] = l;
|
|
36
|
+
return e;
|
|
37
|
+
}, g = /* @__PURE__ */ u(m, [["__scopeId", "data-v-6cb782b8"]]), f = {
|
|
38
|
+
install(t) {
|
|
39
|
+
t.component("HelloWorld", g);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
g as HelloWorld,
|
|
44
|
+
f as default
|
|
45
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.SuncyMyNpmTest={},t.Vue))})(this,(function(t,e){"use strict";const l={class:"greetings"},d={class:"green"},r=((n,s)=>{const o=n.__vccOpts||n;for(const[i,a]of s)o[i]=a;return o})(e.defineComponent({__name:"HelloWorld",props:{msg:{}},setup(n){return(s,o)=>(e.openBlock(),e.createElementBlock("div",l,[e.createElementVNode("h1",d,e.toDisplayString(n.msg),1),o[0]||(o[0]=e.createElementVNode("h3",null,[e.createTextVNode(" You’ve successfully created a project with "),e.createElementVNode("a",{href:"https://vite.dev/",target:"_blank",rel:"noopener"},"Vite"),e.createTextVNode(" + "),e.createElementVNode("a",{href:"https://vuejs.org/",target:"_blank",rel:"noopener"},"Vue 3"),e.createTextVNode(". What's next? ")],-1)),o[1]||(o[1]=e.createElementVNode("iframe",{src:"/static/index.html",width:"100%",height:"400px"},null,-1))]))}}),[["__scopeId","data-v-6cb782b8"]]),c={install(n){n.component("HelloWorld",r)}};t.HelloWorld=r,t.default=c,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/package.json
CHANGED
|
@@ -1,56 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "suncy-my-npm-test",
|
|
3
|
+
"version": "1.0.46",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/suncy-my-npm-test.umd.js",
|
|
7
|
+
"module": "./dist/suncy-my-npm-test.es.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/suncy-my-npm-test.es.js",
|
|
11
|
+
"require": "./dist/suncy-my-npm-test.umd.js"
|
|
12
|
+
},
|
|
13
|
+
"./dist/style.css": "./dist/style.css"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"types": "dist/index.d.ts",
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"vue": "^3.0.0"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"dev": "vite",
|
|
24
|
+
"build": "run-p type-check \"build-only {@}\" --",
|
|
25
|
+
"build:lib": "vite build --mode lib",
|
|
26
|
+
"preview": "vite preview",
|
|
27
|
+
"build-only": "vite build",
|
|
28
|
+
"type-check": "vue-tsc --build",
|
|
29
|
+
"lint": "eslint . --fix --cache",
|
|
30
|
+
"format": "prettier --write --experimental-cli src/"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"pinia": "^3.0.4",
|
|
34
|
+
"vue": "^3.0.0",
|
|
35
|
+
"vue-router": "^4.6.4"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@tsconfig/node24": "^24.0.4",
|
|
39
|
+
"@types/node": "^24.10.9",
|
|
40
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
41
|
+
"@vitejs/plugin-vue-jsx": "^5.1.3",
|
|
42
|
+
"@vue/eslint-config-typescript": "^14.6.0",
|
|
43
|
+
"@vue/tsconfig": "^0.8.1",
|
|
44
|
+
"eslint": "^9.39.2",
|
|
45
|
+
"eslint-config-prettier": "^10.1.8",
|
|
46
|
+
"eslint-plugin-vue": "~10.7.0",
|
|
47
|
+
"jiti": "^2.6.1",
|
|
48
|
+
"npm-run-all2": "^8.0.4",
|
|
49
|
+
"prettier": "3.8.1",
|
|
50
|
+
"typescript": "~5.9.3",
|
|
51
|
+
"vite": "^7.3.1",
|
|
52
|
+
"vite-plugin-copy": "^0.1.6",
|
|
53
|
+
"vite-plugin-vue-devtools": "^8.0.5",
|
|
54
|
+
"vue-tsc": "^3.2.2"
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<button
|
|
3
|
-
class="my-button"
|
|
4
|
-
:class="[typeClass, sizeClass]"
|
|
5
|
-
@click="$emit('click')"
|
|
6
|
-
>
|
|
7
|
-
<slot></slot>
|
|
8
|
-
</button>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
export default {
|
|
13
|
-
name: 'MyButton',
|
|
14
|
-
props: {
|
|
15
|
-
type: {
|
|
16
|
-
type: String,
|
|
17
|
-
default: 'default',
|
|
18
|
-
validator: (value) => ['default', 'primary', 'success', 'warning', 'danger'].includes(value)
|
|
19
|
-
},
|
|
20
|
-
size: {
|
|
21
|
-
type: String,
|
|
22
|
-
default: 'medium',
|
|
23
|
-
validator: (value) => ['small', 'medium', 'large'].includes(value)
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
computed: {
|
|
27
|
-
typeClass() {
|
|
28
|
-
return `my-button--${this.type}`
|
|
29
|
-
},
|
|
30
|
-
sizeClass() {
|
|
31
|
-
return `my-button--${this.size}`
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<style scoped>
|
|
38
|
-
.my-button {
|
|
39
|
-
padding: 10px 20px;
|
|
40
|
-
border: none;
|
|
41
|
-
border-radius: 4px;
|
|
42
|
-
cursor: pointer;
|
|
43
|
-
font-size: 14px;
|
|
44
|
-
transition: all 0.3s;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.my-button--default {
|
|
48
|
-
background: #f0f0f0;
|
|
49
|
-
color: #333;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.my-button--primary {
|
|
53
|
-
background: #409eff;
|
|
54
|
-
color: white;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.my-button--success {
|
|
58
|
-
background: #67c23a;
|
|
59
|
-
color: white;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.my-button--small {
|
|
63
|
-
padding: 8px 16px;
|
|
64
|
-
font-size: 12px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.my-button--medium {
|
|
68
|
-
padding: 10px 20px;
|
|
69
|
-
font-size: 14px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.my-button--large {
|
|
73
|
-
padding: 12px 24px;
|
|
74
|
-
font-size: 16px;
|
|
75
|
-
}
|
|
76
|
-
</style>
|
package/packages/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import MyButton from './components/MyButton.vue'
|
|
2
|
-
|
|
3
|
-
const components = {
|
|
4
|
-
MyButton,
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
const install = function(Vue) {
|
|
8
|
-
if (install.installed) return
|
|
9
|
-
|
|
10
|
-
Object.keys(components).forEach(key => {
|
|
11
|
-
Vue.component(components[key].name, components[key])
|
|
12
|
-
})
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// 自动安装
|
|
16
|
-
if (typeof window !== 'undefined' && window.Vue) {
|
|
17
|
-
install(window.Vue)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export default {
|
|
21
|
-
install,
|
|
22
|
-
...components
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
MyButton,
|
|
27
|
-
}
|