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

add sketch folder to examples #654

Merged
merged 6 commits into from
Nov 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/arduino/exampleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ export class ExampleManager {
children: examplesFromCustomLibraries,
});
}

// load Examples from user's workspace
const sketchesPath = path.join(this._settings.sketchbookPath, "sketches");
const examplesFromSketches = await this.parseExamples(sketchesPath);
if (examplesFromSketches.length) {
examples.push({
name: "Workspace",
path: sketchesPath,
children: examplesFromSketches,
});
}

return examples;
}

Expand Down