Skip to content

Commit

Permalink
优化插件体积
Browse files Browse the repository at this point in the history
  • Loading branch information
jae-jae committed Oct 20, 2019
1 parent d0e2643 commit 4f22344
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
},
extends: 'standard',
globals: {
Electron: true,
Preload: true,
utools: true
},
plugins: [
Expand Down
2 changes: 1 addition & 1 deletion app/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"pluginName": "Zhtw",
"description": "繁体字与简体字互转",
"version": "1.0.0",
"version": "1.0.1",
"author": "Jaeger",
"homepage": "https://github.com/jae-jae",
"main": "index.html",
Expand Down
8 changes: 7 additions & 1 deletion app/preload.js
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
window.Electron = require('electron')
const clipboard = require('electron').clipboard

window.Preload = {
copyText (text) {
clipboard.writeText(text)
}
}
Binary file removed public/favicon.ico
Binary file not shown.
6 changes: 1 addition & 5 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>utools-zhtw</title>
<title>utools</title>
</head>
<body>
<noscript>
<strong>We're sorry but utools-zhtw doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default {
this.cacheAction = null
},
copy () {
Electron.clipboard.writeText(this.toText)
Preload.copyText(this.toText)
this.$Message.info('内容已复制到剪切板!')
},
fromTextChange () {
Expand Down
5 changes: 3 additions & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
publicPath: './'
}
publicPath: './',
productionSourceMap: false
}

0 comments on commit 4f22344

Please sign in to comment.