Skip to content

xiaoluoboding/vue-library-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue Library Starter

NPM Minzip Package NPM Download

A minimal Vue library starter, built on top of Vite & Vue 3

Table of Contents

TOC

Features

Use the Template

GitHub Template

create a repo from this template on GitHub

Clone to local

git clone https://github.com/xiaoluoboding/vue-library-starter

cd vue-library-starter

Usage

Building it is as easy as 1, 2, 3.

1、Install dependencies

pnpm install

2、Build a library

Rename all the vue-library-starter to your component name in the file package.json、vite.config.ts, eg: my-component

pnpm run build:lib

3、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 release

Use in a Nuxt app by adding the module and CSS in your nuxt.config.ts:

export default defineNuxtConfig({
  modules: ['vue-library-starter/nuxt'],
  css: ['vue-library-starter/style.css']
})

4、Publish to npm

npm publish

License

MIT @xiaoluoboding

About

My minimal Vue library starter, built for Vue and Nuxt.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •