From 71882300b0447a0f4112d59cd4883982896e29d0 Mon Sep 17 00:00:00 2001 From: Jonathan Neal Date: Sun, 8 Aug 2021 02:38:38 -0400 Subject: [PATCH] Fix code examples that would fail if copy-pasted (#1050) --- docs/reference/api-reference.md | 2 +- docs/src/pages/reference/api-reference.md | 2 +- docs/src/pages/reference/renderer-reference.md | 6 +++--- examples/snowpack/src/pages/tutorials/react.md | 2 +- examples/snowpack/src/pages/tutorials/svelte.md | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/reference/api-reference.md b/docs/reference/api-reference.md index 08580bcf1..ec78948dd 100644 --- a/docs/reference/api-reference.md +++ b/docs/reference/api-reference.md @@ -42,7 +42,7 @@ const data = Astro.fetchContent('../pages/post/*.md'); // returns an array of po **/ astro: { headers: [], // an array of h1...h6 elements in the markdown file - source: '' // raw source of the markdown file + source: '', // raw source of the markdown file html: '' // rendered HTML of the markdown file }, url: '' // the rendered path diff --git a/docs/src/pages/reference/api-reference.md b/docs/src/pages/reference/api-reference.md index f7e3f92bb..720df458f 100644 --- a/docs/src/pages/reference/api-reference.md +++ b/docs/src/pages/reference/api-reference.md @@ -42,7 +42,7 @@ const data = Astro.fetchContent('../pages/post/*.md'); // returns an array of po **/ astro: { headers: [], // an array of h1...h6 elements in the markdown file - source: '' // raw source of the markdown file + source: '', // raw source of the markdown file html: '' // rendered HTML of the markdown file }, url: '' // the rendered path diff --git a/docs/src/pages/reference/renderer-reference.md b/docs/src/pages/reference/renderer-reference.md index f74a024dd..115fb57f7 100644 --- a/docs/src/pages/reference/renderer-reference.md +++ b/docs/src/pages/reference/renderer-reference.md @@ -59,9 +59,9 @@ export default { snowpackPlugin: '@snowpack/plugin-xxx', // optional, the name of a snowpack plugin to inject snowpackPluginOptions: { example: true }, // optional, any options to be forwarded to the snowpack plugin knownEntrypoint: ['framework'], // optional, entrypoint modules that will be used by compiled source - external: ['dep'] // optional, dependencies that should not be built by snowpack - polyfills: ['./shadow-dom-polyfill.js'] // optional, module scripts that should be loaded before client hydration. - hydrationPolyfills: ['./hydrate-framework.js'] // optional, polyfills that need to run before hydration ever occurs. + external: ['dep'], // optional, dependencies that should not be built by snowpack + polyfills: ['./shadow-dom-polyfill.js'], // optional, module scripts that should be loaded before client hydration. + hydrationPolyfills: ['./hydrate-framework.js'], // optional, polyfills that need to run before hydration ever occurs. jsxImportSource: 'preact', // optional, the name of the library from which JSX is imported jsxTransformOptions: async () => { // optional, a function to transform JSX files const { default: { default: jsx }} = await import('@babel/plugin-transform-react-jsx'); diff --git a/examples/snowpack/src/pages/tutorials/react.md b/examples/snowpack/src/pages/tutorials/react.md index 0b9f38701..eced71003 100644 --- a/examples/snowpack/src/pages/tutorials/react.md +++ b/examples/snowpack/src/pages/tutorials/react.md @@ -118,7 +118,7 @@ The `mount` configuration changes where Snowpack looks for and builds files. Eve ```diff mount: { - /* ... */ -+ // directory name: 'build directory' ++ // directory name: 'build directory', + public: '/', + src: '/dist', }, diff --git a/examples/snowpack/src/pages/tutorials/svelte.md b/examples/snowpack/src/pages/tutorials/svelte.md index dd6ae73f0..36a46e1e9 100644 --- a/examples/snowpack/src/pages/tutorials/svelte.md +++ b/examples/snowpack/src/pages/tutorials/svelte.md @@ -172,7 +172,7 @@ The `mount` configuration changes where Snowpack scan for and builds files. Head mount: { - /* ... */ -+ // directory name: 'build directory' ++ // directory name: 'build directory', + public: '/', + src: '/dist', },