doph-js 0.0.2 → 0.0.3

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/dist/dophJs.js CHANGED
@@ -1,18 +1,27 @@
1
- import { openBlock as n, createElementBlock as e, normalizeClass as c, renderSlot as r } from "vue";
2
- const p = {
1
+ import { openBlock as e, createElementBlock as c, normalizeClass as r, renderSlot as a } from "vue";
2
+ const l = {
3
3
  __name: "DButton",
4
4
  props: {
5
5
  class: String
6
6
  },
7
7
  setup(t) {
8
- const s = t;
9
- return (o, a) => (n(), e("div", {
10
- class: c(["button", s.class])
8
+ const o = t;
9
+ return (n, p) => (e(), c("div", {
10
+ class: r(["button", o.class])
11
11
  }, [
12
- r(o.$slots, "default")
12
+ a(n.$slots, "default")
13
13
  ], 2));
14
14
  }
15
15
  };
16
+ const s = { DButton: l }, i = {
17
+ install(t) {
18
+ for (const o in s)
19
+ if (s.hasOwnProperty(o)) {
20
+ const n = s[o];
21
+ t.component(n.name, n);
22
+ }
23
+ }
24
+ };
16
25
  export {
17
- p as DButton
26
+ i as default
18
27
  };
@@ -1 +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.DophJs={},t.Vue))})(this,function(t,e){"use strict";const n={__name:"DButton",props:{class:String},setup(o){const s=o;return(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["button",s.class])},[e.renderSlot(c.$slots,"default")],2))}},i="",r="",l="",u="";t.DButton=n,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
1
+ (function(n,e){typeof exports=="object"&&typeof module<"u"?module.exports=e(require("vue")):typeof define=="function"&&define.amd?define(["vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,n.DophJs=e(n.Vue))})(this,function(n){"use strict";const e={__name:"DButton",props:{class:String},setup(c){const t=c;return(o,f)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["button",t.class])},[n.renderSlot(o.$slots,"default")],2))}},i="",p="",r="",l="",s={DButton:e};return{install(c){for(const t in s)if(s.hasOwnProperty(t)){const o=s[t];c.component(o.name,o)}}}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doph-js",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Simple Vue3 component library",
5
5
  "author": "Error202",
6
6
  "main": "./dist/dophJs.umd.js",
@@ -0,0 +1,8 @@
1
+ import DButton from "./components/DButton.vue";
2
+
3
+ import './scss/variables.scss'
4
+ import './scss/components.scss'
5
+ import './scss/themes.scss'
6
+ import './scss/global.scss'
7
+
8
+ export default { DButton }
package/src/index.js CHANGED
@@ -1,8 +1,14 @@
1
- import DButton from "./components/DButton.vue";
1
+ import components from'./components'
2
2
 
3
- import './scss/variables.scss'
4
- import './scss/components.scss'
5
- import './scss/themes.scss'
6
- import './scss/global.scss'
3
+ const plugin = {
4
+ install (Vue) {
5
+ for (const prop in components) {
6
+ if (components.hasOwnProperty(prop)) {
7
+ const component = components[prop]
8
+ Vue.component(component.name, component)
9
+ }
10
+ }
11
+ }
12
+ }
7
13
 
8
- export { DButton };
14
+ export default plugin