diff --git a/.github/workflows/gh_pages.yml b/.github/workflows/gh_pages.yml index 4af638f7..e06158c7 100644 --- a/.github/workflows/gh_pages.yml +++ b/.github/workflows/gh_pages.yml @@ -69,7 +69,7 @@ jobs: cmd: install - name: Build Typescript packages run: | - npx turbo run build + yarn run build:pkg - name: Prepare artifacts run: | typst-book build --font-path assets/fonts --path-to-root /typst.ts/cookery/ -w . -d ../../github-pages/cookery/ docs/cookery diff --git a/projects/cetz-editor/src/index.mts b/projects/cetz-editor/src/index.mts index 2960513e..7cc0326b 100644 --- a/projects/cetz-editor/src/index.mts +++ b/projects/cetz-editor/src/index.mts @@ -1,13 +1,27 @@ import { $typst } from '@myriaddreamin/typst.ts/dist/esm/contrib/snippet.mjs'; -// let compiler = fetch( -// 'http://127.0.0.1:20810/base/node_modules/@myriaddreamin/typst-ts-web-compiler/pkg/typst_ts_web_compiler_bg.wasm', -// ); + +// Use CDN let compiler = fetch( 'https://cdn.jsdelivr.net/npm/@myriaddreamin/typst-ts-web-compiler/pkg/typst_ts_web_compiler_bg.wasm', ); let renderer = fetch( 'https://cdn.jsdelivr.net/npm/@myriaddreamin/typst-ts-renderer/pkg/typst_ts_renderer_bg.wasm', ); + +// Use local server +// let compiler = fetch( +// 'http://127.0.0.1:20810/base/node_modules/@myriaddreamin/typst-ts-web-compiler/pkg/typst_ts_web_compiler_bg.wasm', +// ); +// let renderer = fetch( +// 'http://127.0.0.1:20810/base/node_modules/@myriaddreamin/typst-ts-renderer/pkg/typst_ts_renderer_bg.wasm', +// ); + +// Bundle +// @ts-ignore +// import compiler from '@myriaddreamin/typst-ts-web-compiler/pkg/typst_ts_web_compiler_bg.wasm?url'; +// @ts-ignore +// import renderer from '@myriaddreamin/typst-ts-renderer/pkg/typst_ts_renderer_bg.wasm?url'; + $typst.setCompilerInitOptions({ getModule: () => compiler, });