diff --git a/frontend/text-editor/README.md b/frontend/text-editor/README.md index 705c2277bd..1932502880 100644 --- a/frontend/text-editor/README.md +++ b/frontend/text-editor/README.md @@ -7,7 +7,7 @@ To start the development environment run: ```sh -yarn run dev +pnpm run dev ``` ### Testing @@ -15,14 +15,14 @@ yarn run dev For running unit tests and running coverage: ```sh -yarn run test -yarn run coverage +pnpm run test +pnpm run coverage ``` > If you want, you can run the [vitest](https://vitest.dev/) UI by running: ```sh -yarn run test:ui +pnpm run test:ui ``` ## How to build it @@ -30,7 +30,7 @@ yarn run test:ui The editor can be built and updated inside Penpot using the following command: ```sh -PENPOT_SOURCE_PATH=/path/to/penpot/repository yarn build:update +PENPOT_SOURCE_PATH=/path/to/penpot/repository pnpm build:update ``` This command is going to search for the file located in `frontend/src/app/main/ui/workspace/shapes/text/new_editor/TextEditor.js` and update it. diff --git a/frontend/text-editor/package.json b/frontend/text-editor/package.json index 26582f838f..54f63faebe 100644 --- a/frontend/text-editor/package.json +++ b/frontend/text-editor/package.json @@ -7,7 +7,7 @@ "scripts": { "dev": "vite", "coverage": "vitest run --coverage", - "wasm:update": "cp ../resources/public/js/render_wasm.wasm ./src/wasm/render_wasm.wasm && cp ../resources/public/js/render_wasm.js ./src/wasm/render_wasm.js", + "wasm:update": "mkdir -p src/wasm && cp ../resources/public/js/render-wasm.wasm ./src/wasm/render-wasm.wasm && cp ../resources/public/js/render-wasm.js ./src/wasm/render-wasm.js", "test": "vitest --run", "fmt:js": "pnpx prettier -c src/**/*.js", "test:watch": "vitest", diff --git a/frontend/text-editor/src/playground.js b/frontend/text-editor/src/playground.js index b474c412f6..93829dd1c7 100644 --- a/frontend/text-editor/src/playground.js +++ b/frontend/text-editor/src/playground.js @@ -1,7 +1,7 @@ import "./style.css"; import "./fonts.css"; import "./editor/TextEditor.css"; -import initWasmModule from "./wasm/render_wasm.js"; +import initWasmModule from "./wasm/render-wasm.js"; import { UUID } from "./playground/uuid.js"; import { Rect, Point } from "./playground/geom.js"; import { WASMModuleWrapper } from "./playground/wasm.js"; diff --git a/render-wasm/docs/test_playground.md b/render-wasm/docs/test_playground.md index 890659c208..c97c78699b 100644 --- a/render-wasm/docs/test_playground.md +++ b/render-wasm/docs/test_playground.md @@ -68,7 +68,7 @@ The Text Editor Playground provides an isolated environment to test the new rend 2. Start the development server: ```sh - yarn dev + pnpm run dev ``` 3. Open your browser and go to: @@ -78,14 +78,14 @@ This will launch the playground interface where you can interactively test text ### Updating the WASM Renderer -To update the `render_wasm.wasm` and `render_wasm.js` files used by the playground: +To update the `render-wasm.wasm` and `render-wasm.js` files used by the playground: 1. Make sure you have the latest compiled WASM files in `frontend/resources/public/js/`. 2. From the `frontend/text-editor` directory, run: ```sh - yarn wasm:update + pnpm run wasm:update ``` This script will copy the latest `render_wasm.wasm` and `render_wasm.js` into the playground’s `src/wasm/` directory, ensuring the playground uses the most recent build.