Skip to content

Commit

Permalink
测试、打包、发布
Browse files Browse the repository at this point in the history
  • Loading branch information
57code committed Mar 15, 2022
1 parent 5a56053 commit 8b3a396
Show file tree
Hide file tree
Showing 21 changed files with 4,063 additions and 17 deletions.
1 change: 0 additions & 1 deletion .eslintcache

This file was deleted.

1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ node_modules
dist
dist-ssr
*.local

build
# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand Down
44 changes: 44 additions & 0 deletions build/button/index.es.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { defineComponent, toRefs, createVNode } from 'vue'
const buttonProps = {
type: {
type: String,
default: 'secondary'
},
size: {
type: String,
default: 'medium'
},
disabled: {
type: Boolean,
default: false
},
block: {
type: Boolean,
default: false
}
}
var Button = defineComponent({
name: 'SButton',
props: buttonProps,
setup(props, { slots }) {
const { type, size, disabled, block } = toRefs(props)
return () => {
const defaultSlot = slots.default ? slots.default() : '\u6309\u94AE'
const blockCls = block.value ? 's-btn--block' : ''
return createVNode(
'button',
{
disabled: disabled.value,
class: `s-btn s-btn--${type.value} s-btn--${size.value} ${blockCls}`
},
[defaultSlot]
)
}
}
})
var index = {
install(app) {
app.component(Button.name, Button)
}
}
export { Button, index as default }
46 changes: 46 additions & 0 deletions build/button/index.umd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
;(function (e, t) {
typeof exports == 'object' && typeof module != 'undefined'
? t(exports, require('vue'))
: typeof define == 'function' && define.amd
? define(['exports', 'vue'], t)
: ((e = typeof globalThis != 'undefined' ? globalThis : e || self),
t((e.index = {}), e.Vue))
})(this, function (e, t) {
'use strict'
const d = {
type: { type: String, default: 'secondary' },
size: { type: String, default: 'medium' },
disabled: { type: Boolean, default: !1 },
block: { type: Boolean, default: !1 }
}
var n = t.defineComponent({
name: 'SButton',
props: d,
setup(o, { slots: u }) {
const { type: s, size: a, disabled: i, block: f } = t.toRefs(o)
return () => {
const p = u.default ? u.default() : '\u6309\u94AE',
r = f.value ? 's-btn--block' : ''
return t.createVNode(
'button',
{
disabled: i.value,
class: `s-btn s-btn--${s.value} s-btn--${a.value} ${r}`
},
[p]
)
}
}
}),
l = {
install(o) {
o.component(n.name, n)
}
}
;(e.Button = n),
(e.default = l),
Object.defineProperties(e, {
__esModule: { value: !0 },
[Symbol.toStringTag]: { value: 'Module' }
})
})
17 changes: 17 additions & 0 deletions build/button/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "button",
"version": "0.0.2",
"main": "index.umd.js",
"module": "index.umd.js",
"author": "杨村长",
"description": "羊村第一个组件库Sheep-UI,以后村里羊圈能不能建好就看它了!",
"repository": {
"type": "git",
"url": "git+https://github.com/57code/sheep-ui.git"
},
"keywords": ["vue3", "组件库", "tsx", "UI"],
"license": "ISC",
"bugs": {
"url": "https://github.com/57code/sheep-ui/issues"
}
}
17 changes: 17 additions & 0 deletions build/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "sheep-ui",
"version": "0.0.2",
"main": "sheep-ui.umd.js",
"module": "sheep-ui.es.js",
"author": "杨村长",
"description": "羊村第一个组件库Sheep-UI,以后村里羊圈能不能建好就看它了!",
"repository": {
"type": "git",
"url": "git+https://github.com/57code/sheep-ui.git"
},
"keywords": ["vue3", "组件库", "tsx", "UI"],
"license": "ISC",
"bugs": {
"url": "https://github.com/57code/sheep-ui/issues"
}
}
50 changes: 50 additions & 0 deletions build/sheep-ui.es.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { defineComponent, toRefs, createVNode } from 'vue'
const buttonProps = {
type: {
type: String,
default: 'secondary'
},
size: {
type: String,
default: 'medium'
},
disabled: {
type: Boolean,
default: false
},
block: {
type: Boolean,
default: false
}
}
var Button = defineComponent({
name: 'SButton',
props: buttonProps,
setup(props, { slots }) {
const { type, size, disabled, block } = toRefs(props)
return () => {
const defaultSlot = slots.default ? slots.default() : '\u6309\u94AE'
const blockCls = block.value ? 's-btn--block' : ''
return createVNode(
'button',
{
disabled: disabled.value,
class: `s-btn s-btn--${type.value} s-btn--${size.value} ${blockCls}`
},
[defaultSlot]
)
}
}
})
var ButtonPlugin = {
install(app) {
app.component(Button.name, Button)
}
}
const installs = [ButtonPlugin]
var entry = {
install(app) {
installs.forEach(p => app.use(p))
}
}
export { Button, entry as default }
52 changes: 52 additions & 0 deletions build/sheep-ui.umd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
;(function (e, t) {
typeof exports == 'object' && typeof module != 'undefined'
? t(exports, require('vue'))
: typeof define == 'function' && define.amd
? define(['exports', 'vue'], t)
: ((e = typeof globalThis != 'undefined' ? globalThis : e || self),
t((e['sheep-ui'] = {}), e.Vue))
})(this, function (e, t) {
'use strict'
const l = {
type: { type: String, default: 'secondary' },
size: { type: String, default: 'medium' },
disabled: { type: Boolean, default: !1 },
block: { type: Boolean, default: !1 }
}
var u = t.defineComponent({
name: 'SButton',
props: l,
setup(n, { slots: o }) {
const { type: i, size: f, disabled: r, block: p } = t.toRefs(n)
return () => {
const c = o.default ? o.default() : '\u6309\u94AE',
b = p.value ? 's-btn--block' : ''
return t.createVNode(
'button',
{
disabled: r.value,
class: `s-btn s-btn--${i.value} s-btn--${f.value} ${b}`
},
[c]
)
}
}
}),
s = {
install(n) {
n.component(u.name, u)
}
}
const a = [s]
var d = {
install(n) {
a.forEach(o => n.use(o))
}
}
;(e.Button = u),
(e.default = d),
Object.defineProperties(e, {
__esModule: { value: !0 },
[Symbol.toStringTag]: { value: 'Module' }
})
})
Loading

0 comments on commit 8b3a396

Please sign in to comment.