docs: add nuxt3 example (#201)
This commit is contained in:
parent
17b947b27d
commit
6d855d2a53
|
@ -0,0 +1,8 @@
|
|||
node_modules
|
||||
*.log*
|
||||
.nuxt
|
||||
.nitro
|
||||
.cache
|
||||
.output
|
||||
.env
|
||||
dist
|
|
@ -0,0 +1,42 @@
|
|||
# Nuxt 3 Minimal Starter
|
||||
|
||||
Look at the [nuxt 3 documentation](https://v3.nuxtjs.org) to learn more.
|
||||
|
||||
## Setup
|
||||
|
||||
Make sure to install the dependencies:
|
||||
|
||||
```bash
|
||||
# yarn
|
||||
yarn install
|
||||
|
||||
# npm
|
||||
npm install
|
||||
|
||||
# pnpm
|
||||
pnpm install --shamefully-hoist
|
||||
```
|
||||
|
||||
## Development Server
|
||||
|
||||
Start the development server on http://localhost:3000
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Production
|
||||
|
||||
Build the application for production:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
Locally preview production build:
|
||||
|
||||
```bash
|
||||
npm run preview
|
||||
```
|
||||
|
||||
Checkout the [deployment documentation](https://v3.nuxtjs.org/guide/deploy/presets) for more information.
|
|
@ -0,0 +1,16 @@
|
|||
<script setup lang="ts">
|
||||
import { Editor } from '@bytemd/vue-next'
|
||||
import gfm from '@bytemd/plugin-gfm'
|
||||
|
||||
const content = ref('')
|
||||
const plugins = [gfm()]
|
||||
const handleChange = (v: string) => {
|
||||
content.value = v
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ClientOnly>
|
||||
<Editor :value="content" :plugins="plugins" @change="handleChange" />
|
||||
</ClientOnly>
|
||||
</template>
|
|
@ -0,0 +1,6 @@
|
|||
import { defineNuxtConfig } from 'nuxt'
|
||||
|
||||
// https://v3.nuxtjs.org/api/configuration/nuxt.config
|
||||
export default defineNuxtConfig({
|
||||
css: ['bytemd/dist/index.css']
|
||||
})
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "@bytemd/example-nuxt3",
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"nuxt": "3.0.0-rc.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bytemd/plugin-gfm": "latest",
|
||||
"@bytemd/vue-next": "latest",
|
||||
"bytemd": "latest"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
// https://v3.nuxtjs.org/concepts/typescript
|
||||
"extends": "./.nuxt/tsconfig.json"
|
||||
}
|
Loading…
Reference in New Issue