1.0.13 • Published 3 years ago

@bryce-loskie/vueup v1.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.1

3 years ago

0.1.0

3 years ago