gaoshuaixing 5 éve
szülő
commit
1b608a994f
7 módosított fájl, 5 hozzáadás és 43 törlés
  1. 0 14
      .travis.yml
  2. 0 1
      LICENSE.md
  3. 0 0
      app/lanucher.js
  4. 0 0
      app/public/images/loding.gif
  5. 1 1
      app/public/loading.html
  6. 0 16
      appveyor.yml
  7. 4 11
      main.js

+ 0 - 14
.travis.yml

@@ -1,14 +0,0 @@
-
-language: node_js
-node_js:
-  - '8'
-  - '10'
-  - '12'
-before_install:
-  - npm i npminstall -g
-install:
-  - npminstall
-script:
-  - npm run ci
-after_script:
-  - npminstall codecov && codecov

+ 0 - 1
LICENSE.md

@@ -1 +0,0 @@
-GNU General Public License

+ 0 - 0
main/lanucher.js → app/lanucher.js


+ 0 - 0
asset/images/loding.gif → app/public/images/loding.gif


+ 1 - 1
index.html → app/public/loading.html

@@ -16,7 +16,7 @@
  </head> 
  <body> 
   <div id="picture1">
-   <img src="./asset/images/loding.gif" />
+   <img src="./images/loding.gif" />
   </div>  
  </body>
 </html>

+ 0 - 16
appveyor.yml

@@ -1,16 +0,0 @@
-environment:
-  matrix:
-    - nodejs_version: '8'
-    - nodejs_version: '10'
-    - nodejs_version: '12'
-
-install:
-  - ps: Install-Product node $env:nodejs_version
-  - npm i npminstall && node_modules\.bin\npminstall
-
-test_script:
-  - node --version
-  - npm --version
-  - npm run test
-
-build: off

+ 4 - 11
main.js

@@ -1,8 +1,7 @@
 const {app, BrowserWindow, Menu, shell} = require('electron')
 const path = require('path')
-const glob = require('glob')
 const getPort = require('get-port')
-const eggLauncher = require('./main/lanucher')
+const eggLauncher = require('./app/lanucher')
 
 // glogger
 global.GLOGGER = require('electron-log')
@@ -27,7 +26,7 @@ for (let i = 0; i < process.argv.length; i++) {
 }  
 GLOGGER.info('options', options);
 
-if (process.mas) app.setName('box')
+if (process.mas) app.setName('electron-egg')
 
 app.on('web-contents-created', (e, webContents) => {
     webContents.on('new-window', (event, url) => {
@@ -39,7 +38,7 @@ app.on('web-contents-created', (e, webContents) => {
 async function createWindow () {
   MAIN_WINDOW = new BrowserWindow({
     width: 800,
-    height: 800,
+    height: 600,
     minWidth: 800,
     minHeight: 600,
     webPreferences: {
@@ -61,7 +60,7 @@ async function createWindow () {
   }
 
   // loding页
-  MAIN_WINDOW.loadURL(path.join('file://', __dirname, '/index.html'))
+  MAIN_WINDOW.loadURL(path.join('file://', __dirname, '/public/loading.html'))
   
   // egg服务
   setTimeout(function(){
@@ -92,7 +91,6 @@ async function startServer (options) {
 } 
 
 async function initialize () {
-  loadDemos()
   app.whenReady().then(() => {
     createWindow()
     app.on('activate', function () {
@@ -110,9 +108,4 @@ async function initialize () {
   })
 }
 
-function loadDemos () {
-  let files = glob.sync(path.join(__dirname, 'main/**/*.js'))
-  files.forEach((file) => { require(file) })
-}
-
 initialize()