Skip to content
Open
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
11 changes: 10 additions & 1 deletion typescript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ import {

export {version, Parser};
export type {ScaledRecipeWithReport} from "./pkg/cooklang_wasm.js";

export {
ingredient_should_be_listed, ingredient_display_name, grouped_quantity_is_empty, grouped_quantity_display,
cookware_should_be_listed, cookware_display_name, quantity_display
};
export type {
NameAndUrl,
RecipeTime,
Servings, Section, Ingredient, Cookware, Timer, Quantity, GroupedQuantity,
Content, Step, GroupedIndexAndQuantity
};

export class CooklangRecipe {
// Metadata
Expand Down
5 changes: 3 additions & 2 deletions typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"index.ts",
"pkg/cooklang_wasm_bg.wasm",
"pkg/cooklang_wasm_bg.wasm.d.ts",
"pkg/cooklang_wasm_bg.js",
"pkg/cooklang_wasm.d.ts",
"pkg/cooklang_wasm.js"
],
Expand All @@ -21,8 +22,8 @@
],
"scripts": {
"build": "echo noop",
"build-wasm": "wasm-pack build --target bundler",
"watch-wasm": "wasm-pack build --dev --mode no-install --target bundler",
"build-wasm": "wasm-pack build --target nodejs",
"watch-wasm": "wasm-pack build --dev --mode no-install --target nodejs",
"prepare": "npm run build-wasm && npm run build",
"test": "vitest"
},
Expand Down
4 changes: 2 additions & 2 deletions typescript/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"module": "NodeNext",
"target": "es2015",
"target": "es2022",
"lib": [
"es2015",
"es2022",
"dom"
],
"strict": true
Expand Down
5 changes: 2 additions & 3 deletions typescript/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineConfig } from "vite";
import wasm from "vite-plugin-wasm";
import {defineConfig} from "vite";

export default defineConfig({
plugins: [wasm()],
plugins: [],
});
Loading