Skip to content

Commit a0b7ec2

Browse files
committed
Got the markdown demo working for real
1 parent 5d1b2b6 commit a0b7ec2

File tree

4 files changed

+55
-38
lines changed

4 files changed

+55
-38
lines changed

examples/markdown-parser/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { h, render, Component } from "preact";
2-
import asbind from "../../dist/as-bind.esm";
2+
import * as asbind from "../../dist/as-bind.esm";
33

44
// Import our TypeScript equivalent
55
import { convertMarkdownToHTML } from "../../dist/ts/index";

package-lock.json

Lines changed: 49 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"md:wasm:watch": "chokidar --initial \"examples/markdown-parser/assembly/**/*\" -c \"run-s md:wasm:build\"",
2828
"md:ts:watch": "chokidar --initial \"examples/markdown-parser/assembly/**/*\" -c \"run-s md:ts:build\"",
2929
"md:js:watch": "chokidar --initial \"examples/markdown-parser/**/*\" -c \"rollup -c --environment MD,DEV\"",
30-
"md:wasm:build": "asc examples/markdown-parser/assembly/index.ts -b dist/examples/markdown-parser/index.wasm -t dist/examples/markdown-parser/index.wat --sourceMap dist/examples/markdown-parser/index.wasm.map --runtime incremental --exportRuntime",
30+
"md:wasm:build": "asc examples/markdown-parser/assembly/index.ts --transform ./transform.js -b dist/examples/markdown-parser/index.wasm -t dist/examples/markdown-parser/index.wat --sourceMap dist/examples/markdown-parser/index.wasm.map --runtime incremental --exportRuntime",
3131
"md:ts:build": "tsc --project examples/markdown-parser/assembly/ --outDir dist/ts/ --module \"es2015\"",
3232
"md:js:build": "rollup -c --environment MD,PROD",
3333
"md:deploy": "run-s build md:build md:deploy:gh-pages",
@@ -45,7 +45,7 @@
4545
"@babel/plugin-proposal-export-default-from": "^7.12.13",
4646
"@babel/plugin-proposal-object-rest-spread": "^7.13.8",
4747
"@babel/plugin-transform-react-jsx": "^7.12.17",
48-
"@babel/preset-env": "^7.13.10",
48+
"@babel/preset-env": "^7.13.12",
4949
"@rollup/plugin-babel": "^5.3.0",
5050
"@rollup/plugin-commonjs": "^17.1.0",
5151
"@rollup/plugin-json": "^4.1.0",

rollup.markdown-parser.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,12 @@ const sourcemapOption = process.env.PROD ? undefined : "inline";
3434

3535
const babelPluginConfig = {
3636
babelHelpers: "bundled",
37+
presets: ["@babel/preset-env"],
3738
plugins: [
38-
"@babel/preset-env",
3939
"@babel/plugin-proposal-class-properties",
4040
"@babel/plugin-proposal-object-rest-spread",
41-
"@babel/plugin-proposal-export-default-from"[
42-
("@babel/plugin-transform-react-jsx", { pragma: "h" })
43-
]
41+
"@babel/plugin-proposal-export-default-from",
42+
["@babel/plugin-transform-react-jsx", { pragma: "h" }]
4443
]
4544
};
4645

0 commit comments

Comments
 (0)