@bryce-loskie/vueup
TypeScript icon, indicating that this package has built-in type declarations

1.0.13 • Public • Published

Vueup

NPM version

Vueup makes it easy to build vue component lib

Get Started

Install

pnpm i @bryce-loskie/vueup -D

Configuration

// vueup.config.ts
import { defineConfig } from '@bryce-loskie/vueup'

export default defineConfig({
  entry: './src/index.ts',
})

Or

package.json

{
  "vueup": {
    "entry": "./src/index.ts"
  }
}

Scripts

package.json

{
  "scripts": {
    "dev": "vueup --watch",
    "build": "vueup",
  }
}

Full configuration

import { dirname } from 'path'

type LibraryFormats = "es" | "cjs" | "umd" | "iife"

type BuildOptions = {
  entry: string;
  name?: string | undefined;
  fileName?: string | ((format: ModuleFormat) => string) | undefined;
  formats?: LibraryFormats[] | undefined;
  external?: string[]
  banner?: string | (() => string | Promise<string>)
  outDir?: string
  plugins?: (PluginOption | PluginOption[])[]
  clean?: boolean
  jsx?: boolean
  dts?: boolean
  sourcemap?: boolean
  minify?: boolean
  watch?: boolean
  /**
   * Specify the inlude directories to generate dts files
   */
  include?: string | string[]
  exclude?: string | string[]
}

const defaultOptions = {
  plugins = [vue()], // if dts is true, will include `dts()`, if jsx is true, will include `vueJsx()`
  formats = ['es', 'cjs'],
  external = ['vue'],
  outDir = 'dist',
  clean = true,
  dts = true,
  jsx = false,
  minify = false,
  sourcemap = false,
  watch = false,
// default include (used to generate dts)
  include = `${dirname(entry)}/**/*`,
  exclude = [],
}

License

MIT License © 2022 guygubaby

Dependents (0)

Package Sidebar

Install

npm i @bryce-loskie/vueup

Weekly Downloads

1

Version

1.0.13

License

MIT

Unpacked Size

4.59 MB

Total Files

10

Last publish

Collaborators

  • guygubaby