Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 3cd10f3

Browse files
aster94czgtest
authored andcommitted
add sketch folder to examples (#654)
* add sketch folder to examples * Corrected the call to parseExamples * Sketches - > sketches
1 parent 6c7ec8c commit 3cd10f3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/arduino/exampleManager.ts

+12
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,18 @@ export class ExampleManager {
6464
children: examplesFromCustomLibraries,
6565
});
6666
}
67+
68+
// load Examples from user's workspace
69+
const sketchesPath = path.join(this._settings.sketchbookPath, "sketches");
70+
const examplesFromSketches = await this.parseExamples(sketchesPath);
71+
if (examplesFromSketches.length) {
72+
examples.push({
73+
name: "Workspace",
74+
path: sketchesPath,
75+
children: examplesFromSketches,
76+
});
77+
}
78+
6779
return examples;
6880
}
6981

0 commit comments

Comments
 (0)