Skip to content

Fix walkthrough assets not available in vsce package #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
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
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"title": "Check Manim Installation",
"description": "Let's see if you have installed ManimGL.\n[Check Manim version](command:manim-notebook.redetectManimVersion)\n[Open installation guide](https://3b1b.github.io/manim/getting_started/installation.html)",
"media": {
"markdown": "src/walkthrough/manim-installation.md"
"markdown": "assets/walkthrough/manim-installation.md"
},
"completionEvents": [
"onCommand:manim-notebook.redetectManimVersion"
Expand All @@ -192,7 +192,7 @@
"title": "Start with an example",
"description": "Open an example file to see how Manim Notebook works.\n[Open Sample](command:manim-notebook-walkthrough.openSample)",
"media": {
"svg": "src/walkthrough/preview-cell.svg",
"svg": "assets/walkthrough/preview-cell.svg",
"altText": "Preview Manim Cell"
},
"completionEvents": [
Expand All @@ -204,7 +204,7 @@
"title": "Show all available commands",
"description": "Get a list of all available commands in Manim Notebook.\n[Show Commands](command:manim-notebook-walkthrough.showCommands)",
"media": {
"svg": "src/walkthrough/commands.svg",
"svg": "assets/walkthrough/commands.svg",
"altText": "Manim Notebook commands"
},
"completionEvents": [
Expand All @@ -216,7 +216,7 @@
"title": "Show keyboard shortcuts",
"description": "See all available keyboard shortcuts in Manim Notebook and modify them to whatever you like.\n[Show Shortcuts](command:manim-notebook-walkthrough.showShortcuts)",
"media": {
"svg": "src/walkthrough/shortcuts.svg",
"svg": "assets/walkthrough/shortcuts.svg",
"altText": "Manim Notebook keyboard shortcuts"
},
"completionEvents": [
Expand All @@ -228,7 +228,7 @@
"title": "Show settings",
"description": "Customize your Manim Notebook experience by changing settings.\n[Show Settings](command:manim-notebook-walkthrough.showSettings)",
"media": {
"svg": "src/walkthrough/settings.svg",
"svg": "assets/walkthrough/settings.svg",
"altText": "Manim Notebook settings"
},
"completionEvents": [
Expand All @@ -240,7 +240,7 @@
"title": "Open Wiki",
"description": "Learn more about Manim Notebook on the GitHub Wiki.\n[Open Wiki](command:manim-notebook-walkthrough.openWiki)",
"media": {
"svg": "src/walkthrough/wiki.svg",
"svg": "assets/walkthrough/wiki.svg",
"altText": "Manim Notebook Wiki"
},
"completionEvents": [
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { previewManimCell, reloadAndPreviewManimCell, previewCode } from "./prev
import { startScene, exitScene } from "./startStopScene";
import { exportScene } from "./export";
import { Logger, Window, LogRecorder } from "./logger";
import { registerWalkthroughCommands } from "./walkthrough/commands";
import { registerWalkthroughCommands } from "./walkthrough";
import { ExportSceneCodeLens } from "./export";
import { determineManimVersion } from "./manimVersion";
import { setupTestEnvironment } from "./utils/testing";
Expand Down
4 changes: 2 additions & 2 deletions src/walkthrough/commands.ts → src/walkthrough.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as vscode from "vscode";
import { ExtensionContext, window, workspace, commands } from "vscode";
import { Logger } from "../logger";
import { Logger } from "./logger";
import fs from "fs";
import path from "path";

Expand Down Expand Up @@ -55,7 +55,7 @@ export function registerWalkthroughCommands(context: ExtensionContext) {
*/
async function openSampleFile(context: ExtensionContext) {
const sampleFilePath = path.join(context.extensionPath,
"src", "walkthrough", "sample_scene.py");
"assets", "walkthrough", "sample_scene.py");
const sampleFileContent = fs.readFileSync(sampleFilePath, "utf-8");

const sampleFile = await workspace.openTextDocument({
Expand Down
Loading