瀏覽代碼

Some development fixes

tags/v1.4.4
DreamNet 1 年之前
父節點
當前提交
82a56f0e48
共有 8 個文件被更改,包括 102 次插入49 次删除
  1. 17
    0
      .github/stale.yml
  2. 3
    3
      .github/workflows/ci.yml
  3. 3
    17
      src/.release-it.js
  4. 65
    0
      src/.vscode/launch.json
  5. 9
    5
      src/electron/index.js
  6. 1
    1
      src/modules/update/base.js
  7. 3
    22
      src/nuxt.config.js
  8. 1
    1
      src/package.json

+ 17
- 0
.github/stale.yml 查看文件

@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

+ 3
- 3
.github/workflows/ci.yml 查看文件

@@ -30,8 +30,8 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
#- ubuntu-latest
#- windows-latest
- macOS-latest
device:
- any
@@ -133,7 +133,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
BUILD_DEVICE: ${{ matrix.device }}
run: |
yarn release --ci --github.assets="../dist/DreamTime-${{ matrix.os-short }}-${{ matrix.device }}.${{ matrix.os-ext }}"
yarn release --verbose --ci --github.assets="../dist/DreamTime-${{ matrix.os-short }}-${{ matrix.device }}.${{ matrix.os-ext }}"

- name: Upload Internal Artifact
uses: actions/upload-artifact@v1

+ 3
- 17
src/.release-it.js 查看文件

@@ -1,25 +1,11 @@
module.exports = {
hooks: {
'before:init': [
'git config user.email "developers@dreamnet.tech"',
'git config user.name "DreamNet"',
'yarn lint',
'yarn build'
]
'before:init': ['yarn lint', 'yarn build']
},

git: {
requireUpstream: false,
commit: false,
push: false,
tag: true,
tagName: 'v${version}',
tagAnnotation: 'v${version}'
},
git: false,

npm: {
publish: false
},
npm: false,

github: {
release: true,

+ 65
- 0
src/.vscode/launch.json 查看文件

@@ -0,0 +1,65 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "client: electron",
"cwd": "${workspaceRoot}",
"env": {
"NODE_ENV": "development",
"DEBUGGING": "true"
},
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"runtimeArgs": ["--remote-debugging-port=9222", "."],
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
}
},
{
"type": "chrome",
"request": "attach",
"name": "client: electron renderer",
"port": 9222,
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///./*": "${webRoot}/*",
"webpack:///*": "${webRoot}/*"
}
},
{
"type": "node",
"request": "launch",
"name": "server: nuxt",
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"args": ["dev"],
"env": {
"NODE_ENV": "development"
},
"osx": {
"program": "${workspaceFolder}/node_modules/.bin/nuxt"
},
"linux": {
"program": "${workspaceFolder}/node_modules/.bin/nuxt"
},
"windows": {
"program": "${workspaceFolder}/node_modules/nuxt/bin/nuxt.js"
}
}
],
"compounds": [
{
"name": "fullstack",
"configurations": [
"server: nuxt",
"client: electron",
"client: electron renderer"
]
}
]
}

+ 9
- 5
src/electron/index.js 查看文件

@@ -114,9 +114,13 @@ class DreamApp {
this.loadURL = this.getNuxtAppLocation()

if (config.dev) {
// Development,
// Load the DevTools and wait for the NuxtJS server to load.
this.window.webContents.openDevTools()
// Development

if (!process.env.DEBUGGING) {
// Load the DevTools
this.window.webContents.openDevTools()
}

this.pollServer()
} else {
// Production, load the static interface!
@@ -131,7 +135,7 @@ class DreamApp {
console.log(`Requesting status from the server: ${this.loadURL}`)

http
.get(this.loadURL, response => {
.get(this.loadURL, (response) => {
if (response.statusCode === 200) {
console.log('> Server ready, show time!')
this.window.loadURL(this.loadURL)
@@ -170,7 +174,7 @@ class DreamApp {
{
recursive: true
},
error => {
(error) => {
throw new AppError(
`Trying to create the directory to save the models,
please make sure that the application has permissions to create the directory:\n

+ 1
- 1
src/modules/update/base.js 查看文件

@@ -99,7 +99,7 @@ export default class {
linux: '.deb'
})

return `${this.getTitle()}-v${
return `${this.getTitle()}-${
this.latest.tag_name
}-${platform}-x64${extension}`
}

+ 3
- 22
src/nuxt.config.js 查看文件

@@ -131,15 +131,9 @@ module.exports = {
** You can extend webpack config here
*/
extend(config, { isClient, isDev }) {
console.log({
isClient,
isDev
})
if (isDev) {
config.devtool = isClient ? 'source-map' : 'inline-source-map'

config.output.futureEmitAssets = false
config.devtool = isClient ? 'source-map' : 'inline-source-map'

if (!isDev) {
// const RollbarSourceMapPlugin = require('rollbar-sourcemap-webpack-plugin')
/*
config.plugins.push(
@@ -153,20 +147,7 @@ module.exports = {
})
)
*/
/*
config.plugins.push(
new SentryWebpackPlugin({
include: '.',
ignoreFile: '.sentrycliignore',
ignore: ['node_modules', 'nuxt.config.js'],
configFile: 'sentry.properties'
})
)
*/
}

if (!isDev) {
// relative links, please.
} else {
config.output.publicPath = './_nuxt/'
}
}

+ 1
- 1
src/package.json 查看文件

@@ -134,7 +134,7 @@
"build:electron": "cross-env NODE_ENV=production electron-builder --publish=never",
"build": "yarn build:gui && yarn build:electron",
"preview": "yarn build:gui && cross-env NODE_ENV=production DEBUG=app:* electron .",
"release": "release-it"
"release": "release-it --no-increment"
},
"husky": {
"hooks": {

Loading…
取消
儲存