vue-streamdown
v0.0.1
Published
[![NPM][npmBadge]][npmUrl] [![Minzip Package][bundlePhobiaBadge]][bundlePhobiaUrl] [![NPM Download][npmDtBadge]][npmDtUrl]
Readme
Vue Library Starter
A minimal Vue library starter, built on top of Vite & Vue 3
Table of Contents
Features
- Package manager pnpm, safe and fast
- Bundle with the library mode
- Release with semantic-release
- Publish to npm
Use the Template
GitHub Template
create a repo from this template on GitHub
Clone to local
git clone https://github.com/xiaoluoboding/vue-streamdown
cd vue-streamdownUsage
Building it is as easy as 1, 2, 3.
1、Install dependencies
pnpm install2、Build a library
Rename all the vue-streamdown to your component name in the file package.json、vite.config.ts, eg: my-component
pnpm run build:lib3、Build nuxt library
This repository ships a Nuxt module so you can use the library in Nuxt projects.
- Prepare the Nuxt playground and stub the module (handy for local testing)
pnpm run dev:nuxt:prepare- Run the Nuxt playground to verify everything works
pnpm run dev:nuxt- Build the Nuxt module artifacts to
lib/nuxt
pnpm run build:module- (Optional) Build all outputs (ESM, UMD, Nuxt) in one go
pnpm run releaseUse in a Nuxt app by adding the module and CSS in your nuxt.config.ts:
export default defineNuxtConfig({
modules: ['vue-streamdown/nuxt'],
css: ['vue-streamdown/style.css']
})4、Publish to npm
npm publishLicense
MIT @xiaoluoboding
