Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
snowlocked committed Feb 13, 2020
2 parents 8079377 + ba3289d commit 57217d3
Show file tree
Hide file tree
Showing 5 changed files with 771 additions and 507 deletions.
32 changes: 0 additions & 32 deletions .grenrc.js

This file was deleted.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"@babel/core": "^7.4.3",
"@babel/plugin-transform-runtime": "^7.4.3",
"@babel/preset-env": "^7.4.3",
"@femessage/github-release-notes": "^0.19.0",
"babel-loader": "^8.0.5",
"file-loader": "^3.0.1",
"github-release-notes": "^0.17.0",
"glob": "^7.1.3",
"husky": "1.3.1",
"jest": "^24.8.0",
Expand Down Expand Up @@ -97,5 +97,6 @@
"stylelint --fix",
"git add"
]
}
},
"gren": "@femessage/grenrc"
}
8 changes: 2 additions & 6 deletions src/components/line-wrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export default {
</script>
<style lang="less">
.line-wrapper {
display: flex;
color: #f1f1f1;
line-height: 20px;
height: 20px;
Expand All @@ -75,19 +76,14 @@ export default {
}
.line-number {
display: inline-block;
min-width: 40px;
text-align: right;
color: #666;
padding-right: 8px;
padding-right: 10px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.line-content {
display: inline-block;
}
}
</style>
18 changes: 7 additions & 11 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
// Import vue component
import Component from './log-viewer.vue'

// install function executed by Vue.use()
export function install(Vue) {
if (install.installed) return
install.installed = true
Vue.component('LogViewer', Component)
}

// Create module definition for Vue.use()
const plugin = {
install
// `Vue.use` automatically prevents you from using
// the same plugin more than once,
// so calling it multiple times on the same plugin
// will install the plugin only once
Component.install = Vue => {
Vue.component(Component.name, Component)
}

// To auto-install when vue is found
Expand All @@ -21,7 +17,7 @@ if (typeof window !== 'undefined') {
GlobalVue = global.Vue
}
if (GlobalVue) {
GlobalVue.use(plugin)
GlobalVue.use(Component)
}

// To allow use as module (npm/webpack/etc.) export component
Expand Down
Loading

0 comments on commit 57217d3

Please sign in to comment.