From 9d3dadc9904da0b532b097a5667d002012cc19b2 Mon Sep 17 00:00:00 2001 From: Will Crichton Date: Wed, 15 May 2024 15:58:53 -0700 Subject: [PATCH] Add README to standalone example --- example/standalone/README.md | 11 +++++++++++ example/standalone/styles/index.scss | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 example/standalone/README.md diff --git a/example/standalone/README.md b/example/standalone/README.md new file mode 100644 index 0000000..12e2718 --- /dev/null +++ b/example/standalone/README.md @@ -0,0 +1,11 @@ +# Standalone example + +This shows how to use the `@wcrichto/quiz` package in your own standalone web page. It provides a React quiz component. To build it, install [pnpm](https://pnpm.io/) and then run: + +``` +pnpm exec vite build +cd dist +python3 -m http.server +``` + +Then visit . \ No newline at end of file diff --git a/example/standalone/styles/index.scss b/example/standalone/styles/index.scss index 06501df..c56addf 100644 --- a/example/standalone/styles/index.scss +++ b/example/standalone/styles/index.scss @@ -1,2 +1,7 @@ @import "normalize.css/normalize.css"; -@import "@wcrichto/quiz/dist/lib.scss"; \ No newline at end of file +@import "@wcrichto/quiz/dist/lib.scss"; + +#root { + max-width: 800px; + margin: 1rem auto; +} \ No newline at end of file