Skip to content

Commit

Permalink
chore(build): 修改static文件位置,挪动到 public 目录下,以打包进 app.asar 文件中
Browse files Browse the repository at this point in the history
  • Loading branch information
gmlayer0 authored and cjj826 committed Jun 2, 2023
1 parent b3c48d2 commit 6db443f
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/universe-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- dev
- release
- build/*
workflow_dispatch:

jobs:
Expand Down
Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/main/menu/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import path from 'path'
const builtInDocumentsFileName = ['功能规格说明书.md']

export function getBuiltInDocumentsPath () {
return builtInDocumentsFileName.map(filename => path.resolve(__dirname, '../static/docs', filename))
return builtInDocumentsFileName.map(filename => path.resolve(__dirname, './static/docs', filename))
}
2 changes: 1 addition & 1 deletion src/main/preferences/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { ipcMain } from 'electron'
class Preference {
constructor () {
this._preferencePath = path.resolve(userDataPath, 'preferences.json')
this._defaultPreferencePath = path.resolve(__dirname, '..', 'static', 'preferences.json')
this._defaultPreferencePath = path.resolve(__dirname, '.', 'static', 'preferences.json')
// 注:electron-store有性能问题(IO),但支持JSON scheme验证
try {
this._store = new Store({
Expand Down
1 change: 0 additions & 1 deletion static/docs/功能规格说明书.md

This file was deleted.

3 changes: 0 additions & 3 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ module.exports = defineConfig({
{
from: './build/exec/updater.exe',
to: '../'
}, {
from: './static/preferences.json',
to: './static/preferences.json'
}
],
mac: {
Expand Down

0 comments on commit 6db443f

Please sign in to comment.