Skip to content

Commit 302585c

Browse files
paulrosenWebCoder49
authored andcommitted
Add Nuxt demo
1 parent ad487ba commit 302585c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docs/vue-tutorial.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ If all went well, you should see the following in the browser:
154154

155155
### 1. Create a Nuxt app
156156

157-
First, create a Nuxt project. (If you already have a Vue project then you can skip this step). On a command line, type this:
157+
First, create a Nuxt project. (If you already have a Nuxt project then you can skip this step). On a command line, type this:
158158
```bash
159159
npm create nuxt@latest syntax-highlighter
160160
```
@@ -219,7 +219,7 @@ cd syntax-highlighter
219219
npm run dev
220220
```
221221

222-
You should be able to open your browser to the path that it prints out and see a working Vue app. If so, congratulations! Hit Ctrl-C to stop it.
222+
You should be able to open your browser to the path that it prints out and see a working Nuxt app. If so, congratulations! Hit Ctrl-C to stop it.
223223

224224
### 2. Add dependencies
225225

@@ -246,7 +246,9 @@ Also add this:
246246
css: ['@webcoder49/code-input/code-input.css', 'highlight.js/styles/default.min.css'],
247247
```
248248

249-
So that the necessary css is loaded for code-input, and an example theme is loaded. You might want to replace the second file with your own theme, but you need the first file.
249+
So that the necessary css is loaded for code-input, and an example theme is loaded.
250+
251+
> You might want to replace the second file with your own theme, but you need the first file.
250252
251253
### 3. Initialize the textarea
252254

@@ -290,7 +292,8 @@ const props = defineProps<{
290292
// This contains the HTMLElement of the code-input component
291293
const elem = ref()
292294
293-
// Before it appears on the page, code-input needs to be initialized
295+
// Before it appears on the page, code-input needs to be initialized.
296+
// This must be onBeforeMount and not onMount!
294297
onBeforeMount(async () => {
295298
// Only if we're in the client
296299
if (import.meta.browser) {

0 commit comments

Comments
 (0)