This plugin enables loading of Cooklang markup files.
npm install --save-dev vite-plugin-cooklang
# OR
yarn add -D vite-plugin-cooklang
Add the plugin to your Vite config as below:
// vite.config.js
import { defineConfig } from "vite";
import cooklang from "vite-plugin-cooklang";
export default defineConfig({
plugins: [cooklang()],
});
Recipes are loaded using the Cooklang-TS library and have the below properties:
import recipe from "./test/example/recipes/Easy Pancakes.cook";
const {
//
ingredients,
cookwares,
metadata,
steps,
shoppingList,
} = recipe;
See the test project for an example of using this plugin.
- Write a readme.
- Test both inline
Recipe
class and JSON transformer approaches. - More tests!
- The Cooklang-TS TypeScript library
- The Cooklang project and it's contributors
- UnJS Project Starter Template