Compare commits
No commits in common. 'main' and 'published' have entirely different histories.
21 changed files with 98 additions and 3689 deletions
@ -1,2 +0,0 @@ |
|||
node_modules |
|||
dist |
@ -1,14 +0,0 @@ |
|||
import Vue from "vue"; |
|||
import { VaguerComponents } from "./src"; |
|||
import "./dist/style.css" |
|||
|
|||
Vue.use(VaguerComponents); |
|||
|
|||
const app = new Vue({ |
|||
methods: { |
|||
handleClick() { |
|||
alert("222"); |
|||
}, |
|||
}, |
|||
}); |
|||
app.$mount("#app"); |
@ -0,0 +1,4 @@ |
|||
import { default as VaguerButton } from './VaguerButton.vue'; |
|||
|
|||
export { VaguerButton }; |
|||
export default VaguerButton; |
@ -0,0 +1,3 @@ |
|||
import { default as VaguerButton } from './VaguerButton/VaguerButton.vue'; |
|||
|
|||
export { VaguerButton }; |
@ -0,0 +1,6 @@ |
|||
import { PluginObject } from 'vue'; |
|||
|
|||
import * as components from "./components"; |
|||
export default components; |
|||
export declare const VaguerComponents: PluginObject<{}>; |
|||
export { default as VaguerButton } from './components/VaguerButton'; |
@ -0,0 +1 @@ |
|||
.vaguer-button{color:red} |
@ -0,0 +1 @@ |
|||
"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; |
@ -0,0 +1,74 @@ |
|||
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 |
|||
}; |
@ -0,0 +1 @@ |
|||
(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"}})}); |
@ -1,14 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
<head> |
|||
<meta charset="UTF-8" /> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
|||
<title>Document</title> |
|||
</head> |
|||
<body> |
|||
<div id="app"> |
|||
<vaguer-button @click.native="handleClick">aa</vaguer-button> |
|||
</div> |
|||
<script type="module" src="/dev.ts"></script> |
|||
</body> |
|||
</html> |
File diff suppressed because it is too large
@ -1 +0,0 @@ |
|||
https://github.com/wheatjs/vaguer |
@ -1,10 +0,0 @@ |
|||
import ghpages from "gh-pages"; |
|||
|
|||
ghpages.publish( |
|||
".", |
|||
{ dotfiles: true, branch: "published", src: ["package.json", "dist/**/*"] }, |
|||
function (err) { |
|||
if (err) throw err; |
|||
console.log("success"); |
|||
} |
|||
); |
@ -1,30 +0,0 @@ |
|||
import { defineRootConfig } from "somebuild"; |
|||
import fs from "node:fs"; |
|||
|
|||
const loadJSON = (path) => JSON.parse(fs.readFileSync(new URL(path, import.meta.url), "utf8")); |
|||
|
|||
const json = loadJSON("./package.json"); |
|||
|
|||
export default defineRootConfig({ |
|||
mode: "component-vue2", |
|||
"component-vue2": { |
|||
less27: true, |
|||
outDir: "./dist", |
|||
name: json.name, |
|||
dtsEntryRoot: "src", |
|||
entry: "src/index.ts", |
|||
config: { |
|||
devWatchMode: true, |
|||
vite: { |
|||
resolve: { |
|||
alias: { |
|||
"@": "./src", |
|||
...(process.env.DEV |
|||
? { vue: "vue/dist/vue.esm.js" } |
|||
: {}), |
|||
}, |
|||
}, |
|||
}, |
|||
}, |
|||
}, |
|||
}); |
@ -1,22 +0,0 @@ |
|||
|
|||
<script> |
|||
export default { |
|||
data(){ |
|||
return { |
|||
a: 123 |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<template> |
|||
<button class="vaguer-button"> |
|||
<slot />-{{ a }} |
|||
</button> |
|||
</template> |
|||
|
|||
<style lang="scss"> |
|||
.vaguer-button { |
|||
color: red; |
|||
} |
|||
</style> |
@ -1,6 +0,0 @@ |
|||
import VaguerButton from "./VaguerButton.vue" |
|||
|
|||
export { |
|||
VaguerButton |
|||
} |
|||
export default VaguerButton |
@ -1,18 +0,0 @@ |
|||
// const components = import.meta.globEager("./**/*.vue");
|
|||
|
|||
// const exportable: any = {};
|
|||
|
|||
// function getName(key: string) {
|
|||
// return key
|
|||
// .substring(location.pathname.lastIndexOf("/") + 2)
|
|||
// .split(".vue")[0];
|
|||
// }
|
|||
|
|||
// Object.entries(components).forEach(([key, value]) => {
|
|||
// exportable[value.name ? value.name : getName(key)] = value.default;
|
|||
// });
|
|||
|
|||
// export default exportable;
|
|||
import VaguerButton from "./VaguerButton/VaguerButton.vue"; |
|||
|
|||
export { VaguerButton }; |
@ -1,14 +0,0 @@ |
|||
import type { PluginObject } from "vue"; |
|||
|
|||
import * as components from "./components"; |
|||
export default components; |
|||
|
|||
export const VaguerComponents: PluginObject<{}> = { |
|||
install(app) { |
|||
Object.entries(components).forEach(([key, value]: [string, any]) => { |
|||
app.component(key, value); |
|||
}); |
|||
}, |
|||
}; |
|||
|
|||
export { default as VaguerButton } from "./components/VaguerButton"; |
@ -1,5 +0,0 @@ |
|||
declare module '*.vue' { |
|||
import { DefineComponent } from 'vue' |
|||
const component: DefineComponent<{}, {}, any> |
|||
export default component |
|||
} |
@ -1,13 +0,0 @@ |
|||
{ |
|||
"compilerOptions": { |
|||
"module": "ESNext", |
|||
"moduleResolution": "Bundler", |
|||
"resolveJsonModule": true, |
|||
"esModuleInterop": true, |
|||
"baseUrl": ".", |
|||
"paths": { |
|||
"@/*": ["./src/*"] |
|||
} |
|||
}, |
|||
"exclude": ["node_modules", ".output"] |
|||
} |
Loading…
Reference in new issue