Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.41 KB

README.md

File metadata and controls

34 lines (23 loc) · 1.41 KB

Demo Macromania Scientific Writing

This repository gives a demo of writing papers with Macromania.

Setup

First, install the deno javascript runtime. The macros for file IO currently only work with deno. Eventually, they should become runtime agnostic (and pluggable enough to work even in environments that don't have a file system), but we are not there yet.

Next, clone this repo, cd in there.

That is it. You can build the website with deno task build, you can make it build automatically after saving with deno task watch, and you can start a webserver for viewing the website with deno task serve.

If your text editor gives type errors for the jsx, you might have to add workspace-level jsx configuration in a /path/to/workspace/deno.json file:

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "display": "Deno",

  "imports": {
    "macromaniajsx/jsx-dev-runtime": "https://deno.land/x/macromania@v0.1.0/mod.ts",
    "macromaniajsx/jsx-runtime": "https://deno.land/x/macromania@v0.1.0/mod.ts"
  },

  "compilerOptions": {
    "jsx": "react-jsxdev",
    "jsxImportSource": "macromaniajsx",
  }
}

Editing

The entrypoint to macro expansion is in src/main.tsx. Have fun!