fix: aligned Add File... behavior with IDE 1.x

- code files will be copied to sketch folder root
 - other files go under the `data` folder in the sketch folder root

Closes #284

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta
2023-01-06 14:39:49 +01:00
committed by Akos Kitta
parent b2bf368db9
commit 197cea2a60
2 changed files with 21 additions and 15 deletions

View File

@@ -162,18 +162,9 @@ export namespace Sketch {
}
export namespace Extensions {
export const MAIN = ['.ino', '.pde'];
export const SOURCE = ['.c', '.cpp', '.s'];
export const ADDITIONAL = [
'.h',
'.c',
'.hpp',
'.hh',
'.cpp',
'.S',
'.json',
'.md',
'.adoc',
];
export const SOURCE = ['.c', '.cpp', '.S'];
export const CODE_FILES = [...MAIN, ...SOURCE, '.h', '.hh', '.hpp'];
export const ADDITIONAL = [...CODE_FILES, '.json', '.md', '.adoc'];
export const ALL = Array.from(new Set([...MAIN, ...SOURCE, ...ADDITIONAL]));
}
export function isInSketch(uri: string | URI, sketch: Sketch): boolean {