mirror of
https://github.com/ershisan99/md-preview-desktop.git
synced 2025-12-16 20:59:24 +00:00
chore: fix build by using yarn instead of pnpm
This commit is contained in:
@@ -9,8 +9,7 @@ files:
|
|||||||
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
|
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
|
||||||
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
|
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
|
||||||
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
|
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
|
||||||
asarUnpack:
|
asar: false
|
||||||
- resources/**
|
|
||||||
win:
|
win:
|
||||||
executableName: md-preview-desktop
|
executableName: md-preview-desktop
|
||||||
nsis:
|
nsis:
|
||||||
|
|||||||
9625
pnpm-lock.yaml
generated
9625
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -52,6 +52,12 @@ function createWindow(): void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is.dev) {
|
||||||
|
process.env.NODE_ENV = 'development'
|
||||||
|
} else {
|
||||||
|
process.env.NODE_ENV = 'production'
|
||||||
|
}
|
||||||
|
|
||||||
// This method will be called when Electron has finished
|
// This method will be called when Electron has finished
|
||||||
// initialization and is ready to create browser windows.
|
// initialization and is ready to create browser windows.
|
||||||
// Some APIs can only be used after this event occurs.
|
// Some APIs can only be used after this event occurs.
|
||||||
@@ -196,8 +202,9 @@ if (lastOpenDir) {
|
|||||||
prepareAndSendDir(lastOpenDir)
|
prepareAndSendDir(lastOpenDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initially setup watcher for 'hello.md'
|
if (lastFilePath) {
|
||||||
setupWatcher(lastFilePath ?? path.resolve(__dirname, '../../../hello.md'))
|
setupWatcher(lastFilePath)
|
||||||
|
}
|
||||||
|
|
||||||
function getFilesRecursive(
|
function getFilesRecursive(
|
||||||
directory: string,
|
directory: string,
|
||||||
|
|||||||
@@ -29,10 +29,11 @@ export const View = ({ setFileName }) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const contentListener: IpcRendererListener = (_event, content) => {
|
const contentListener: IpcRendererListener = (_event, content) => {
|
||||||
setCode(content.code)
|
if (!content) return
|
||||||
setFileName(content.fileName)
|
setCode(content?.code)
|
||||||
setSelectedFile(content.fileName)
|
setFileName(content?.fileName)
|
||||||
setToc(content.toc)
|
setSelectedFile(content?.fileName)
|
||||||
|
setToc(content?.toc)
|
||||||
}
|
}
|
||||||
|
|
||||||
const directoryContentsListener: IpcRendererListener = (_event, content) => {
|
const directoryContentsListener: IpcRendererListener = (_event, content) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user