Add .gitignore for electron:package artifacts and lint
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -63,3 +63,6 @@ Mac_App_Distribution.provisionprofile
|
||||
|
||||
venv
|
||||
.vite/
|
||||
|
||||
# electron
|
||||
out/
|
@ -212,8 +212,12 @@ const collectAllFilesRecursiveFrom = async (path: string) => {
|
||||
// Sort all entries so files come first and directories last
|
||||
// so a top-most KCL file is returned first.
|
||||
entries.sort((a: string, b: string) => {
|
||||
if (a.endsWith(".kcl") && !b.endsWith(".kcl")) { return -1 }
|
||||
if (!a.endsWith(".kcl") && b.endsWith(".kcl")) { return 1 }
|
||||
if (a.endsWith('.kcl') && !b.endsWith('.kcl')) {
|
||||
return -1
|
||||
}
|
||||
if (!a.endsWith('.kcl') && b.endsWith('.kcl')) {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
})
|
||||
|
||||
@ -249,7 +253,10 @@ const collectAllFilesRecursiveFrom = async (path: string) => {
|
||||
return entry
|
||||
}
|
||||
|
||||
export const getDefaultKclFileForDir = async (projectDir: string, file: FileEntry) => {
|
||||
export const getDefaultKclFileForDir = async (
|
||||
projectDir: string,
|
||||
file: FileEntry
|
||||
) => {
|
||||
// Make sure the dir is a directory.
|
||||
const isFileEntryDir = await window.electron.statIsDirectory(projectDir)
|
||||
if (!isFileEntryDir) {
|
||||
|
@ -95,8 +95,8 @@ export const fileLoader: LoaderFunction = async (
|
||||
return redirect(
|
||||
`${paths.FILE}/${encodeURIComponent(
|
||||
isDesktop()
|
||||
? project.default_file
|
||||
: (params.id + '/' + PROJECT_ENTRYPOINT)
|
||||
? project.default_file
|
||||
: params.id + '/' + PROJECT_ENTRYPOINT
|
||||
)}`
|
||||
)
|
||||
}
|
||||
|
15
src/main.ts
15
src/main.ts
@ -27,11 +27,11 @@ const createWindow = () => {
|
||||
})
|
||||
|
||||
const splashWindow = new BrowserWindow({
|
||||
width: 500,
|
||||
height: 300,
|
||||
transparent: false,
|
||||
frame: false,
|
||||
alwaysOnTop: true
|
||||
width: 500,
|
||||
height: 300,
|
||||
transparent: false,
|
||||
frame: false,
|
||||
alwaysOnTop: true,
|
||||
})
|
||||
|
||||
// and load the index.html of the app.
|
||||
@ -39,7 +39,9 @@ const createWindow = () => {
|
||||
splashWindow.loadFile(`splash.html`)
|
||||
mainWindow.loadURL(MAIN_WINDOW_VITE_DEV_SERVER_URL)
|
||||
} else {
|
||||
splashWindow.loadFile(path.join(__dirname, `../renderer/${MAIN_WINDOW_VITE_NAME}/splash.html`))
|
||||
splashWindow.loadFile(
|
||||
path.join(__dirname, `../renderer/${MAIN_WINDOW_VITE_NAME}/splash.html`)
|
||||
)
|
||||
mainWindow.loadFile(
|
||||
path.join(__dirname, `../renderer/${MAIN_WINDOW_VITE_NAME}/index.html`)
|
||||
)
|
||||
@ -135,4 +137,3 @@ ipcMain.handle('login', async (event, host) => {
|
||||
|
||||
return tokenSet.access_token
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user