Add .gitignore for electron:package artifacts and lint

This commit is contained in:
Pierre Jacquier
2024-08-03 07:39:06 -04:00
committed by 49lf
parent dc4741ae43
commit 9f07e2f500
4 changed files with 23 additions and 12 deletions

View File

@ -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) {