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}'
|
||||
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
|
||||
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
|
||||
asarUnpack:
|
||||
- resources/**
|
||||
asar: false
|
||||
win:
|
||||
executableName: md-preview-desktop
|
||||
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
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
@@ -196,8 +202,9 @@ if (lastOpenDir) {
|
||||
prepareAndSendDir(lastOpenDir)
|
||||
}
|
||||
|
||||
// Initially setup watcher for 'hello.md'
|
||||
setupWatcher(lastFilePath ?? path.resolve(__dirname, '../../../hello.md'))
|
||||
if (lastFilePath) {
|
||||
setupWatcher(lastFilePath)
|
||||
}
|
||||
|
||||
function getFilesRecursive(
|
||||
directory: string,
|
||||
|
||||
@@ -29,10 +29,11 @@ export const View = ({ setFileName }) => {
|
||||
|
||||
useEffect(() => {
|
||||
const contentListener: IpcRendererListener = (_event, content) => {
|
||||
setCode(content.code)
|
||||
setFileName(content.fileName)
|
||||
setSelectedFile(content.fileName)
|
||||
setToc(content.toc)
|
||||
if (!content) return
|
||||
setCode(content?.code)
|
||||
setFileName(content?.fileName)
|
||||
setSelectedFile(content?.fileName)
|
||||
setToc(content?.toc)
|
||||
}
|
||||
|
||||
const directoryContentsListener: IpcRendererListener = (_event, content) => {
|
||||
|
||||
Reference in New Issue
Block a user