From 1621676573e126045cb9a9e7c7a9f5db7a996771 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Mon, 21 Oct 2019 18:26:17 +0900 Subject: [PATCH] config of electron is changed --- config/main.webpack.config.ts | 9 ++++++++- main/src/app/AppWindow.ts | 6 +++++- package-lock.json | 11 +++++++++++ package.json | 2 ++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/config/main.webpack.config.ts b/config/main.webpack.config.ts index 5cd68bf5..523d6814 100644 --- a/config/main.webpack.config.ts +++ b/config/main.webpack.config.ts @@ -1,5 +1,6 @@ import * as path from 'path'; import { CleanWebpackPlugin } from 'clean-webpack-plugin'; +import * as CopyWebpackPlugin from 'copy-webpack-plugin'; import * as webpack from 'webpack'; import * as nodeExternals from 'webpack-node-externals'; import { getEnviroments } from './enviroment'; @@ -67,7 +68,13 @@ const mainConfig: webpack.Configuration = { Object.assign({}, enviroments, { __PROCESS_KIND__: JSON.stringify('main') }) - ) + ), + new CopyWebpackPlugin([ + { + from: 'main/resources/**/*', + to: path.resolve(__dirname, '..', 'dist') + } + ]) ], resolve: { extensions: ['.js', '.ts'], diff --git a/main/src/app/AppWindow.ts b/main/src/app/AppWindow.ts index 3c0231cd..6a0284fa 100644 --- a/main/src/app/AppWindow.ts +++ b/main/src/app/AppWindow.ts @@ -31,6 +31,9 @@ export class AppWindow { height: savedWindowState.height, minWidth: this.minWidth, minHeight: this.minHeight, + center: true, + autoHideMenuBar: true, + title: 'UCAP M Messenger', // This fixes subpixel aliasing on Windows // See https://github.com/atom/atom/commit/683bef5b9d133cb194b476938c77cc07fd05b972 backgroundColor: '#fff', @@ -42,7 +45,8 @@ export class AppWindow { experimentalFeatures: true, nodeIntegration: true }, - acceptFirstMouse: true + acceptFirstMouse: true, + icon: path.join(__dirname, 'resources/image', 'ico_64_64.png') }; if (__DARWIN__) { diff --git a/package-lock.json b/package-lock.json index e99c7a34..1ed1e573 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2166,6 +2166,17 @@ "integrity": "sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA==", "dev": true }, + "@types/copy-webpack-plugin": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/copy-webpack-plugin/-/copy-webpack-plugin-5.0.0.tgz", + "integrity": "sha512-yQHocgdgES7W5Q2UyxJ5cj/E6MrV1zq3MZ8jdApS9NJKqax+rux9IE3QAbBmNCGbgivEsejrkIq3Rm76JLubkg==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*", + "@types/webpack": "*" + } + }, "@types/crypto-js": { "version": "3.1.43", "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-3.1.43.tgz", diff --git a/package.json b/package.json index f5d0f010..b96876e2 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "@ngrx/store": "^8.4.0", "@ngrx/store-devtools": "^8.4.0", "@ngx-translate/core": "^11.0.1", + "@types/copy-webpack-plugin": "^5.0.0", "@types/crypto-js": "^3.1.43", "@types/detect-browser": "^4.0.0", "@types/extract-text-webpack-plugin": "^3.0.4", @@ -58,6 +59,7 @@ "awesome-node-loader": "^1.1.1", "awesome-typescript-loader": "^5.2.1", "clean-webpack-plugin": "^3.0.0", + "copy-webpack-plugin": "^5.0.4", "codelyzer": "^5.0.0", "concurrently": "^4.1.2", "crypto-js": "^3.1.9-1",