mirror of
https://github.com/mii443/obsidian-typst.git
synced 2025-08-22 16:15:34 +00:00
restructure project
This commit is contained in:
10
.gitignore
vendored
10
.gitignore
vendored
@ -20,8 +20,8 @@ data.json
|
|||||||
|
|
||||||
# Exclude macOS Finder (System Explorer) View States
|
# Exclude macOS Finder (System Explorer) View States
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
|
||||||
# Added by cargo
|
# Added by cargo
|
||||||
|
|
||||||
/target
|
target
|
||||||
|
0
Cargo.lock → compiler/Cargo.lock
generated
0
Cargo.lock → compiler/Cargo.lock
generated
@ -47,7 +47,7 @@ const context = await esbuild.context({
|
|||||||
banner: {
|
banner: {
|
||||||
js: banner,
|
js: banner,
|
||||||
},
|
},
|
||||||
entryPoints: ["main.ts"],
|
entryPoints: ["src/main.ts"],
|
||||||
bundle: true,
|
bundle: true,
|
||||||
external: [
|
external: [
|
||||||
"obsidian",
|
"obsidian",
|
||||||
|
@ -4,11 +4,12 @@
|
|||||||
"description": "Renders `typst` code blocks to images with Typst.",
|
"description": "Renders `typst` code blocks to images with Typst.",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"wasm": "wasm-pack build --target web",
|
"build-dev": "node esbuild.config.mjs",
|
||||||
"dev": "node esbuild.config.mjs",
|
|
||||||
"wasm-dev": "wasm-pack build --target web --dev && node esbuild.config.mjs",
|
|
||||||
"wasm-build": "wasm-pack build --target web && tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
|
|
||||||
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
|
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
|
||||||
|
"wasm": "wasm-pack build compiler --target web",
|
||||||
|
"wasm-dev": "wasm-pack build compiler --target web --dev",
|
||||||
|
"wasm-build-dev": "npm run wasm-dev && npm run build-dev",
|
||||||
|
"wasm-build": "npm run wasm && npm run build",
|
||||||
"version": "node version-bump.mjs && git add manifest.json versions.json"
|
"version": "node version-bump.mjs && git add manifest.json versions.json"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
import wasmBin from './pkg/obsidian_typst_bg.wasm'
|
import wasmBin from '../pkg/obsidian_typst_bg.wasm'
|
||||||
import * as typst from './pkg'
|
import * as typst from '../pkg'
|
||||||
|
|
||||||
import { CompileCommand, WorkerRequest } from "types";
|
import { CompileCommand, WorkerRequest } from "src/types";
|
||||||
|
|
||||||
typst.initSync(wasmBin);
|
typst.initSync(wasmBin);
|
||||||
|
|
@ -3,8 +3,8 @@ import { App, renderMath, HexString, Platform, Plugin, PluginSettingTab, Setting
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import CompilerWorker from "./compiler.worker.ts"
|
import CompilerWorker from "./compiler.worker.ts"
|
||||||
|
|
||||||
import TypstCanvasElement from 'typst-canvas-element';
|
import TypstCanvasElement from './typst-canvas-element';
|
||||||
import { WorkerRequest } from 'types.js';
|
import { WorkerRequest } from './types';
|
||||||
|
|
||||||
interface TypstPluginSettings {
|
interface TypstPluginSettings {
|
||||||
noFill: boolean,
|
noFill: boolean,
|
0
types.d.ts → src/types.d.ts
vendored
0
types.d.ts → src/types.d.ts
vendored
Reference in New Issue
Block a user