1
0
mirror of https://github.com/coreui/coreui-icons.git synced 2025-08-21 07:51:21 +02:00

refactor: delete vue.js module

This commit is contained in:
woothu
2019-11-06 15:53:30 +01:00
parent 9e1780a312
commit d78a5a2f11
12 changed files with 0 additions and 15984 deletions

View File

@@ -1,77 +0,0 @@
<template>
<svg
v-if="name || content"
xmlns="http://www.w3.org/2000/svg"
:viewBox="viewBox"
:class="computedClasses"
v-html="icon.svgContent"
></svg>
<component
v-else
:is="fontIconTag"
:class="computedClasses"
></component>
</template>
<script>
export default {
name: 'CIcon',
//This object contains icons added before component registration
icons: {},
props: {
name: String,
content: [String, Array],
// fill: String,
// background: String,
size: {
type: String,
validator: size => ['sm', 'lg', 'xl', 'custom-size'].includes(size)
},
customClasses: [String, Array, Object],
fontIconTag: {
type: String,
default: 'i'
}
},
computed: {
iconName () {
const iconNameIsKebabCase = this.name && this.name.includes('-')
return iconNameIsKebabCase ? this.toCamelCase(this.name) : this.name
},
code () {
return this.content || this.$options.icons[this.iconName]
},
icon () {
if (Array.isArray(this.code)) {
const coordinates = this.code.length > 1 ? this.code[0] : '64 64'
const svgContent = this.code.length > 1 ? this.code[1] : this.code[0]
return { coordinates, svgContent }
}
return { coordinates: '64 64', svgContent: this.code }
},
viewBox () {
return this.$attrs.viewBox || `0 0 ${ this.icon.coordinates }`
},
// style () {
// return {
// fill: this.fill || 'currentColor',
// background: this.background
// }
// },
computedSize () {
return this.$attrs.width || this.$attrs.height ? 'custom-size' : this.size
},
computedClasses () {
return this.customClasses ||
['c-icon', { [`c-icon-${this.computedSize}`]: this.computedSize }]
}
},
methods: {
toCamelCase (str) {
return str.replace(/([-_][a-z0-9])/ig, ($1) => {
return $1.toUpperCase().replace('-', '')
})
}
}
}
</script>

View File

@@ -1,7 +0,0 @@
module.exports = {
presets: [
["@vue/app", {
"modules": false
}]
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

10
vue/dist/demo.html vendored
View File

@@ -1,10 +0,0 @@
<meta charset="utf-8">
<title>coreui-icons-vue demo</title>
<script src="./coreui-icons-vue.umd.js"></script>
<link rel="stylesheet" href="./coreui-icons-vue.css">
<script>
console.log(coreui-icons-vue)
</script>

View File

@@ -1,10 +0,0 @@
import CIcon from './CIcon'
export { CIcon }
const CIconPlugin = {
install (Vue, customIconSet) {
CIcon.icons = customIconSet
Vue.component('CIcon', CIcon)
}
}
export { CIconPlugin }

12243
vue/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,44 +0,0 @@
{
"name": "coreui-icons-vue",
"sideEffects": false,
"version": "1.0.0-alpha.1",
"main": "dist/coreui-icons-vue.common.js",
"scripts": {
"build": "vue-cli-service build --target lib --name coreui-icons-vue ./index.js",
"lint": "vue-cli-service lint"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.8.0",
"@vue/cli-plugin-eslint": "^3.8.0",
"@vue/cli-service": "^3.8.0",
"babel-eslint": "^10.0.1",
"babel-preset-vue-app": "^2.0.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"vue-template-compiler": "^2.6.10"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}