From 405a9a2844a28d45e7d9c6fd28b2ed9d4457efd8 Mon Sep 17 00:00:00 2001 From: Rock070 Date: Mon, 18 Sep 2023 00:00:21 +0800 Subject: [PATCH] doc: make noti demo page (#16) * doc: make noti demo page * asd --- docs/.gitignore | 9 + docs/.npmrc | 1 + docs/README.md | 42 + docs/app.vue | 10 + docs/content/index.md | 13 + docs/layouts/playground.vue | 188 + docs/nuxt.config.ts | 16 + docs/package.json | 20 + docs/plugins/@vue3-noti.ts | 19 + docs/public/favicon.ico | Bin 0 -> 4286 bytes docs/server/tsconfig.json | 3 + docs/tsconfig.json | 4 + docs/unocss.config.ts | 21 + packages/core/package.json | 5 +- playground/src/App.vue | 4 +- pnpm-lock.yaml | 7456 ++++++++++++++++++++++++++++++++--- pnpm-workspace.yaml | 1 + 17 files changed, 7223 insertions(+), 589 deletions(-) create mode 100644 docs/.gitignore create mode 100644 docs/.npmrc create mode 100644 docs/README.md create mode 100644 docs/app.vue create mode 100644 docs/content/index.md create mode 100644 docs/layouts/playground.vue create mode 100644 docs/nuxt.config.ts create mode 100644 docs/package.json create mode 100644 docs/plugins/@vue3-noti.ts create mode 100644 docs/public/favicon.ico create mode 100644 docs/server/tsconfig.json create mode 100644 docs/tsconfig.json create mode 100644 docs/unocss.config.ts diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..d8bd037 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,9 @@ +node_modules +*.log* +.nuxt +.nitro +.cache +.output +.data +.env +dist diff --git a/docs/.npmrc b/docs/.npmrc new file mode 100644 index 0000000..c483022 --- /dev/null +++ b/docs/.npmrc @@ -0,0 +1 @@ +shamefully-hoist=true \ No newline at end of file diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..4c626cd --- /dev/null +++ b/docs/README.md @@ -0,0 +1,42 @@ +# Content v2 Minimal Starter + +Look at the [Content documentation](https://content-v2.nuxtjs.org/) to learn more. + +## Setup + +Make sure to install the dependencies: + +```bash +# yarn +yarn install + +# npm +npm install + +# pnpm +pnpm install +``` + +## 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/docs/deployment) for more information. diff --git a/docs/app.vue b/docs/app.vue new file mode 100644 index 0000000..79beefc --- /dev/null +++ b/docs/app.vue @@ -0,0 +1,10 @@ + + + diff --git a/docs/content/index.md b/docs/content/index.md new file mode 100644 index 0000000..d160df3 --- /dev/null +++ b/docs/content/index.md @@ -0,0 +1,13 @@ +--- +layout: playground +--- + +# Nuxt Content + +This page corresponds to the `/` route of your website. You can delete it or create another file in the `content/` directory. + +Try to navigate to [/about](/about). These 2 pages are rendered by the `pages/[...slug].vue` component. + +--- + +Look at the [Content documentation](https://content.nuxtjs.org/) to learn more. diff --git a/docs/layouts/playground.vue b/docs/layouts/playground.vue new file mode 100644 index 0000000..3a5ce30 --- /dev/null +++ b/docs/layouts/playground.vue @@ -0,0 +1,188 @@ + + + + + diff --git a/docs/nuxt.config.ts b/docs/nuxt.config.ts new file mode 100644 index 0000000..bb6e991 --- /dev/null +++ b/docs/nuxt.config.ts @@ -0,0 +1,16 @@ +// https://v3.nuxtjs.org/api/configuration/nuxt.config +export default defineNuxtConfig({ + modules: ['@nuxt/content', '@unocss/nuxt'], + extends: ['@nuxt-themes/docus'], + imports: { + transform: { + // you could also add the path of your built library to prevent this happening + // for your users, but the issue is probably only replicable in your monorepo + // https://github.com/nuxt/nuxt/issues/18823#issuecomment-1419704343 + exclude: [/\bcore\b/], + }, + }, + content: { + documentDriven: true, + }, +}) diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 0000000..e724038 --- /dev/null +++ b/docs/package.json @@ -0,0 +1,20 @@ +{ + "type": "module", + "private": true, + "scripts": { + "build": "nuxt build", + "dev": "nuxt dev", + "generate": "nuxt generate", + "preview": "nuxt preview" + }, + "dependencies": { + "@nuxt-themes/docus": "^1.14.6", + "@unocss/nuxt": "^0.55.7", + "@vue3-noti/core": "workspace:*", + "@vueuse/core": "^10.4.1" + }, + "devDependencies": { + "@nuxt/content": "^2.8.2", + "nuxt": "^3.7.3" + } +} diff --git a/docs/plugins/@vue3-noti.ts b/docs/plugins/@vue3-noti.ts new file mode 100644 index 0000000..93ec444 --- /dev/null +++ b/docs/plugins/@vue3-noti.ts @@ -0,0 +1,19 @@ +import { NotiPlugin } from '@vue3-noti/core' +import type { NotiOptions } from '@vue3-noti/core' +import '@vue3-noti/core/style.css' + +export default defineNuxtPlugin({ + name: '@vue3-noti', + async setup(nuxtApp) { + const notiOptions: NotiOptions = { + message: 'Hello', + type: 'success', + duration: 1000, + position: 'top-right', + hoverPause: true, + showProgressBar: true, + } + + nuxtApp.vueApp.use(NotiPlugin, notiOptions) + }, +}) diff --git a/docs/public/favicon.ico b/docs/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..18993ad91cfd43e03b074dd0b5cc3f37ab38e49c GIT binary patch literal 4286 zcmeHLOKuuL5PjK%MHWVi6lD zOGiREbCw`xmFozJ^aNatJY>w+g ze6a2@u~m#^BZm@8wco9#Crlli0uLb^3E$t2-WIc^#(?t)*@`UpuofJ(Uyh@F>b3Ph z$D^m8Xq~pTkGJ4Q`Q2)te3mgkWYZ^Ijq|hkiP^9`De={bQQ%heZC$QU2UpP(-tbl8 zPWD2abEew;oat@w`uP3J^YpsgT%~jT(Dk%oU}sa$7|n6hBjDj`+I;RX(>)%lm_7N{+B7Mu%H?422lE%MBJH!!YTN2oT7xr>>N-8OF$C&qU^ z>vLsa{$0X%q1fjOe3P1mCv#lN{xQ4_*HCSAZjTb1`}mlc+9rl8$B3OP%VT@mch_~G z7Y+4b{r>9e=M+7vSI;BgB?ryZDY4m>&wcHSn81VH1N~`0gvwH{ z8dv#hG|OK`>1;j7tM#B)Z7zDN?{6=dUal}$e=10.3.0", + "vue": ">=3.3.4" + }, "dependencies": { - "@vueuse/core": "^10.3.0" }, "devDependencies": { "@vitejs/plugin-vue": "^4.2.3", diff --git a/playground/src/App.vue b/playground/src/App.vue index 92c2a14..f3c6ed0 100644 --- a/playground/src/App.vue +++ b/playground/src/App.vue @@ -120,7 +120,7 @@ const durationSecond = computed(() => { -