From d4fe6efd8185023d4511ceed8f645dd3872615e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E4=BA=9A=E6=98=95?= <1549469775@qq.com> Date: Mon, 1 Dec 2025 14:41:04 +0800 Subject: [PATCH] Updates --- dist/components/FakeButton/index.d.ts | 4 ++ dist/components/VaguerButton/index.d.ts | 4 -- dist/components/index.d.ts | 4 +- dist/fake-ui.cjs | 1 + dist/fake-ui.js | 73 ++++++++++++++++++++++++++++++++ dist/fake-ui.umd.cjs | 1 + dist/index.d.ts | 4 +- dist/style.css | 2 +- dist/vaguer-button.cjs | 1 - dist/vaguer-button.js | 74 --------------------------------- dist/vaguer-button.umd.cjs | 1 - package.json | 50 ++++++++++++++++++---- 12 files changed, 126 insertions(+), 93 deletions(-) create mode 100644 dist/components/FakeButton/index.d.ts delete mode 100644 dist/components/VaguerButton/index.d.ts create mode 100644 dist/fake-ui.cjs create mode 100644 dist/fake-ui.js create mode 100644 dist/fake-ui.umd.cjs delete mode 100644 dist/vaguer-button.cjs delete mode 100644 dist/vaguer-button.js delete mode 100644 dist/vaguer-button.umd.cjs diff --git a/dist/components/FakeButton/index.d.ts b/dist/components/FakeButton/index.d.ts new file mode 100644 index 0000000..d01d971 --- /dev/null +++ b/dist/components/FakeButton/index.d.ts @@ -0,0 +1,4 @@ +import { default as FakeButton } from './FakeButton.vue'; + +export { FakeButton, }; +export default FakeButton; diff --git a/dist/components/VaguerButton/index.d.ts b/dist/components/VaguerButton/index.d.ts deleted file mode 100644 index 1375047..0000000 --- a/dist/components/VaguerButton/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { default as VaguerButton } from './VaguerButton.vue'; - -export { VaguerButton }; -export default VaguerButton; diff --git a/dist/components/index.d.ts b/dist/components/index.d.ts index 0488476..e2067b4 100644 --- a/dist/components/index.d.ts +++ b/dist/components/index.d.ts @@ -1,3 +1,3 @@ -import { default as VaguerButton } from './VaguerButton/VaguerButton.vue'; +import { default as FakeButton } from './FakeButton/FakeButton.vue'; -export { VaguerButton }; +export { FakeButton }; diff --git a/dist/fake-ui.cjs b/dist/fake-ui.cjs new file mode 100644 index 0000000..9647788 --- /dev/null +++ b/dist/fake-ui.cjs @@ -0,0 +1 @@ +"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var C=function(){var t=this,n=t.$createElement,a=t._self._c||n;return a("button",{staticClass:"fake-button"},[t._t("default")],2)},b=[];function g(t,n,a,v,s,i,_,p){var e=typeof t=="function"?t.options:t;n&&(e.render=n,e.staticRenderFns=a,e._compiled=!0),v&&(e.functional=!0),i&&(e._scopeId="data-v-"+i);var r;if(_?(r=function(o){o=o||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!o&&typeof __VUE_SSR_CONTEXT__<"u"&&(o=__VUE_SSR_CONTEXT__),s&&s.call(this,o),o&&o._registeredComponents&&o._registeredComponents.add(_)},e._ssrRegister=r):s&&(r=p?function(){s.call(this,(e.functional?this.parent:this).$root.$options.shadowRoot)}:s),r)if(e.functional){e._injectStyles=r;var h=e.render;e.render=function(m,l){return r.call(l),h(m,l)}}else{var u=e.beforeCreate;e.beforeCreate=u?[].concat(u,r):[r]}return{exports:t,options:e}}const k={data(){return{a:123}}},f={};var F=g(k,C,b,!1,S,null,null,null);function S(t){for(let n in f)this[n]=f[n]}const c=function(){return F.exports}(),d=Object.freeze(Object.defineProperty({__proto__:null,FakeButton:c},Symbol.toStringTag,{value:"Module"})),$={install(t){Object.entries(d).forEach(([n,a])=>{t.component(n,a)})}};exports.FakeButton=c;exports.FakeComponents=$;exports.default=d; diff --git a/dist/fake-ui.js b/dist/fake-ui.js new file mode 100644 index 0000000..a50d380 --- /dev/null +++ b/dist/fake-ui.js @@ -0,0 +1,73 @@ +var h = function() { + var n = this, t = n.$createElement, a = n._self._c || t; + return a("button", { + staticClass: "fake-button" + }, [n._t("default")], 2); +}, m = []; +function C(n, t, a, c, s, _, i, d) { + var e = typeof n == "function" ? n.options : n; + t && (e.render = t, e.staticRenderFns = a, e._compiled = !0), c && (e.functional = !0), _ && (e._scopeId = "data-v-" + _); + var r; + if (i ? (r = function(o) { + o = o || // cached call + this.$vnode && this.$vnode.ssrContext || // stateful + this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !o && typeof __VUE_SSR_CONTEXT__ < "u" && (o = __VUE_SSR_CONTEXT__), s && s.call(this, o), o && o._registeredComponents && o._registeredComponents.add(i); + }, e._ssrRegister = r) : s && (r = d ? function() { + s.call( + this, + (e.functional ? this.parent : this).$root.$options.shadowRoot + ); + } : s), r) + if (e.functional) { + e._injectStyles = r; + var v = e.render; + e.render = function(p, f) { + return r.call(f), v(p, f); + }; + } else { + var u = e.beforeCreate; + e.beforeCreate = u ? [].concat(u, r) : [r]; + } + return { + exports: n, + options: e + }; +} +const b = { + data() { + return { + a: 123 + }; + } +}, l = {}; +var $ = /* @__PURE__ */ C( + b, + h, + m, + !1, + R, + null, + null, + null +); +function R(n) { + for (let t in l) + this[t] = l[t]; +} +const g = /* @__PURE__ */ function() { + return $.exports; +}(), k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + FakeButton: g +}, Symbol.toStringTag, { value: "Module" })), y = { + install(n) { + Object.entries(k).forEach(([t, a]) => { + n.component(t, a); + }); + } +}; +export { + g as FakeButton, + y as FakeComponents, + k as default +}; diff --git a/dist/fake-ui.umd.cjs b/dist/fake-ui.umd.cjs new file mode 100644 index 0000000..7409ad0 --- /dev/null +++ b/dist/fake-ui.umd.cjs @@ -0,0 +1 @@ +(function(i,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(i=typeof globalThis<"u"?globalThis:i||self,s(i["fake-ui"]={}))})(this,function(i){"use strict";var s=function(){var n=this,t=n.$createElement,a=n._self._c||t;return a("button",{staticClass:"fake-button"},[n._t("default")],2)},h=[];const $="";function m(n,t,a,T,u,d,c,g){var e=typeof n=="function"?n.options:n;t&&(e.render=t,e.staticRenderFns=a,e._compiled=!0),T&&(e.functional=!0),d&&(e._scopeId="data-v-"+d);var r;if(c?(r=function(o){o=o||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!o&&typeof __VUE_SSR_CONTEXT__<"u"&&(o=__VUE_SSR_CONTEXT__),u&&u.call(this,o),o&&o._registeredComponents&&o._registeredComponents.add(c)},e._ssrRegister=r):u&&(r=g?function(){u.call(this,(e.functional?this.parent:this).$root.$options.shadowRoot)}:u),r)if(e.functional){e._injectStyles=r;var F=e.render;e.render=function(S,v){return r.call(v),F(S,v)}}else{var p=e.beforeCreate;e.beforeCreate=p?[].concat(p,r):[r]}return{exports:n,options:e}}const C={data(){return{a:123}}},_={};var b=m(C,s,h,!1,k,null,null,null);function k(n){for(let t in _)this[t]=_[t]}const f=function(){return b.exports}(),l=Object.freeze(Object.defineProperty({__proto__:null,FakeButton:f},Symbol.toStringTag,{value:"Module"})),y={install(n){Object.entries(l).forEach(([t,a])=>{n.component(t,a)})}};i.FakeButton=f,i.FakeComponents=y,i.default=l,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); diff --git a/dist/index.d.ts b/dist/index.d.ts index 1893a40..cda2810 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -2,5 +2,5 @@ import { PluginObject } from 'vue'; import * as components from "./components"; export default components; -export declare const VaguerComponents: PluginObject<{}>; -export { default as VaguerButton } from './components/VaguerButton'; +export declare const FakeComponents: PluginObject; +export { default as FakeButton } from './components/FakeButton'; diff --git a/dist/style.css b/dist/style.css index a123371..6f6aa20 100644 --- a/dist/style.css +++ b/dist/style.css @@ -1 +1 @@ -.vaguer-button{color:red} +.fake-button{color:red} diff --git a/dist/vaguer-button.cjs b/dist/vaguer-button.cjs deleted file mode 100644 index 260a879..0000000 --- a/dist/vaguer-button.cjs +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var m=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("button",{staticClass:"vaguer-button"},[e._t("default"),e._v("-"+e._s(e.a)+" ")],2)},C=[];function b(e,n,a,v,s,_,i,p){var t=typeof e=="function"?e.options:e;n&&(t.render=n,t.staticRenderFns=a,t._compiled=!0),v&&(t.functional=!0),_&&(t._scopeId="data-v-"+_);var r;if(i?(r=function(o){o=o||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!o&&typeof __VUE_SSR_CONTEXT__<"u"&&(o=__VUE_SSR_CONTEXT__),s&&s.call(this,o),o&&o._registeredComponents&&o._registeredComponents.add(i)},t._ssrRegister=r):s&&(r=p?function(){s.call(this,(t.functional?this.parent:this).$root.$options.shadowRoot)}:s),r)if(t.functional){t._injectStyles=r;var h=t.render;t.render=function(g,l){return r.call(l),h(g,l)}}else{var u=t.beforeCreate;t.beforeCreate=u?[].concat(u,r):[r]}return{exports:e,options:t}}const S={data(){return{a:123}}},f={};var V=b(S,m,C,!1,$,null,null,null);function $(e){for(let n in f)this[n]=f[n]}const c=function(){return V.exports}(),d=Object.freeze(Object.defineProperty({__proto__:null,VaguerButton:c},Symbol.toStringTag,{value:"Module"})),y={install(e){Object.entries(d).forEach(([n,a])=>{e.component(n,a)})}};console.log(22);exports.VaguerButton=c;exports.VaguerComponents=y;exports.default=d; diff --git a/dist/vaguer-button.js b/dist/vaguer-button.js deleted file mode 100644 index 267f205..0000000 --- a/dist/vaguer-button.js +++ /dev/null @@ -1,74 +0,0 @@ -var h = function() { - var e = this, t = e.$createElement, a = e._self._c || t; - return a("button", { - staticClass: "vaguer-button" - }, [e._t("default"), e._v("-" + e._s(e.a) + " ")], 2); -}, m = []; -function C(e, t, a, c, s, _, i, d) { - var n = typeof e == "function" ? e.options : e; - t && (n.render = t, n.staticRenderFns = a, n._compiled = !0), c && (n.functional = !0), _ && (n._scopeId = "data-v-" + _); - var r; - if (i ? (r = function(o) { - o = o || // cached call - this.$vnode && this.$vnode.ssrContext || // stateful - this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !o && typeof __VUE_SSR_CONTEXT__ < "u" && (o = __VUE_SSR_CONTEXT__), s && s.call(this, o), o && o._registeredComponents && o._registeredComponents.add(i); - }, n._ssrRegister = r) : s && (r = d ? function() { - s.call( - this, - (n.functional ? this.parent : this).$root.$options.shadowRoot - ); - } : s), r) - if (n.functional) { - n._injectStyles = r; - var v = n.render; - n.render = function(p, l) { - return r.call(l), v(p, l); - }; - } else { - var u = n.beforeCreate; - n.beforeCreate = u ? [].concat(u, r) : [r]; - } - return { - exports: e, - options: n - }; -} -const g = { - data() { - return { - a: 123 - }; - } -}, f = {}; -var b = /* @__PURE__ */ C( - g, - h, - m, - !1, - $, - null, - null, - null -); -function $(e) { - for (let t in f) - this[t] = f[t]; -} -const R = /* @__PURE__ */ function() { - return b.exports; -}(), y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ - __proto__: null, - VaguerButton: R -}, Symbol.toStringTag, { value: "Module" })), O = { - install(e) { - Object.entries(y).forEach(([t, a]) => { - e.component(t, a); - }); - } -}; -console.log(22); -export { - R as VaguerButton, - O as VaguerComponents, - y as default -}; diff --git a/dist/vaguer-button.umd.cjs b/dist/vaguer-button.umd.cjs deleted file mode 100644 index fe33307..0000000 --- a/dist/vaguer-button.umd.cjs +++ /dev/null @@ -1 +0,0 @@ -(function(r,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(r=typeof globalThis<"u"?globalThis:r||self,s(r["vaguer-button"]={}))})(this,function(r){"use strict";var s=function(){var e=this,t=e.$createElement,u=e._self._c||t;return u("button",{staticClass:"vaguer-button"},[e._t("default"),e._v("-"+e._s(e.a)+" ")],2)},h=[];const O="";function g(e,t,u,T,a,d,c,S){var n=typeof e=="function"?e.options:e;t&&(n.render=t,n.staticRenderFns=u,n._compiled=!0),T&&(n.functional=!0),d&&(n._scopeId="data-v-"+d);var i;if(c?(i=function(o){o=o||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!o&&typeof __VUE_SSR_CONTEXT__<"u"&&(o=__VUE_SSR_CONTEXT__),a&&a.call(this,o),o&&o._registeredComponents&&o._registeredComponents.add(c)},n._ssrRegister=i):a&&(i=S?function(){a.call(this,(n.functional?this.parent:this).$root.$options.shadowRoot)}:a),i)if(n.functional){n._injectStyles=i;var V=n.render;n.render=function($,p){return i.call(p),V($,p)}}else{var v=n.beforeCreate;n.beforeCreate=v?[].concat(v,i):[i]}return{exports:e,options:n}}const m={data(){return{a:123}}},_={};var b=g(m,s,h,!1,C,null,null,null);function C(e){for(let t in _)this[t]=_[t]}const f=function(){return b.exports}(),l=Object.freeze(Object.defineProperty({__proto__:null,VaguerButton:f},Symbol.toStringTag,{value:"Module"})),y={install(e){Object.entries(l).forEach(([t,u])=>{e.component(t,u)})}};console.log(22),r.VaguerButton=f,r.VaguerComponents=y,r.default=l,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); diff --git a/package.json b/package.json index 8a13465..9acbc71 100644 --- a/package.json +++ b/package.json @@ -1,31 +1,65 @@ { - "name": "vaguer-button", + "name": "fake-ui", "type": "module", - "main": "./dist/vaguer-button.js", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/fake-ui.js", + "require": "./dist/fake-ui.cjs" + }, + "./style.css": { + "import": "./dist/style.css", + "require": "./dist/style.css" + } + }, + "main": "./dist/fake-ui.js", + "module": "./dist/fake-ui.js", "typings": "./dist/index.d.ts", + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + }, + "files": [ + "dist" + ], "scripts": { + "postinstall": "lefthook install", "watch": "somebuild build --watch", "dev": "somebuild dev", - "build": "somebuild build" + "build": "somebuild build", + "release": "pnpm build && node scripts/publish-branch.js", + "eslint": "eslint .", + "format": "eslint --fix .", + "publish": "pnpm build && npm publish", + "docs:dev": "vuepress dev docs", + "docs:build": "vuepress build docs" }, "globals": { "vue": "Vue" }, - "dependencies": { - "vue": "2.6.14", - "vue-template-compiler": "2.6.14" + "peerDependencies": { + "vue": "<= 2.6.14" }, "devDependencies": { + "@antfu/eslint-config": "4.13.2", "@somebuild/build-component-vue2": "^0.0.6", "@somebuild/vite-config-vue2": "^1.0.1", "@types/node": "^20.12.10", + "eslint": "9.29.0", + "eslint-flat-config-utils": "2.1.0", + "eslint-plugin-format": "1.0.1", "gh-pages": "^6.1.1", + "lefthook": "^2.0.4", "sass": "^1.77.0", "somebuild": "^0.0.19", - "vaguer-button": "github:somebuild-org/vue2-demo#published" + "vue": "2.6.14", + "vue-server-renderer": "2.6.14", + "vue-template-compiler": "2.6.14", + "vuepress": "^1.9.10", + "vuepress-plugin-demo-container": "^0.2.0" }, "volta": { "node": "18.17.1", "pnpm": "9.0.6" } -} \ No newline at end of file +}