Skip to content

Commit

Permalink
release v2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
saqqdy committed Apr 4, 2023
1 parent 301dc36 commit e78a3c6
Show file tree
Hide file tree
Showing 9 changed files with 215 additions and 189 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change logs

## 2023.04.04 v2.1.1

1. Optimized build script
2. upgrade all package version

## 2023.04.03 v2.1.0

1. remove un-need banner
Expand Down
73 changes: 47 additions & 26 deletions build/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { visualizer } from 'rollup-plugin-visualizer'
import pkg from '../package.json' assert { type: 'json' }
import { banner, extensions, reporter } from './config'

const externals = [...Object.keys(pkg.dependencies || {})]
const nodeResolver = nodeResolve({
// Use the `package.json` "browser" field
browser: false,
Expand All @@ -38,14 +37,14 @@ const options: RollupOptions = {
]
}),
nodeResolver,
commonjs({
sourceMap: false,
exclude: ['core-js']
}),
babel({
babelHelpers: 'bundled',
extensions,
exclude: ['node_modules']
exclude: [/node_modules[\\/]core-js/]
}),
commonjs({
sourceMap: false,
exclude: ['core-js']
}),
typescript({
compilerOptions: {
Expand All @@ -61,9 +60,9 @@ const options: RollupOptions = {
}

function externalCjsEsm(id: string) {
return ['vue', 'vue2', 'vue-demi', 'core-js', '@babel/runtime']
.concat(externals)
.some(k => new RegExp('^' + k).test(id))
return ['vue', 'vue2', 'vue-demi', 'core-js', '@babel/runtime'].some(k =>
new RegExp('^' + k).test(id)
)
}

function externalUmd(id: string) {
Expand All @@ -73,26 +72,48 @@ function externalUmd(id: string) {
const distDir = (path: string) =>
process.env.BABEL_ENV === 'es5' ? path.replace('index', 'es5/index') : path

export default [
{
input: 'src/index.ts',
output: [
export default (process.env.BABEL_ENV !== 'es5'
? ([
{
file: distDir(pkg.main),
exports: 'auto',
format: 'cjs'
},
input: 'src/index.ts',
output: [
{
file: pkg.main,
exports: 'auto',
format: 'cjs'
},
{
file: pkg.module,
exports: 'auto',
format: 'es'
}
],
external: externalCjsEsm,
...options
}
] as RollupOptions[])
: ([
{
file: distDir(pkg.module),
exports: 'auto',
format: 'es'
input: pkg.module,
output: [
{
file: distDir(pkg.main),
exports: 'auto',
format: 'cjs'
},
{
file: distDir(pkg.module),
exports: 'auto',
format: 'es'
}
],
external: externalCjsEsm,
...options
}
],
external: externalCjsEsm,
...options
},
] as RollupOptions[])
).concat([
{
input: distDir('dist/index.mjs'),
input: distDir(pkg.main),
output: [
{
file: distDir('dist/index.iife.js'),
Expand Down Expand Up @@ -126,4 +147,4 @@ export default [
visualizer()
]
}
]
])
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
index.md - v2.1.0 / [Exports](modules.md)
index.md - v2.1.1 / [Exports](modules.md)

<div style="text-align: center;" align="center">

Expand Down
18 changes: 9 additions & 9 deletions docs/classes/default.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[index.md - v2.1.0](../README.md) / [Exports](../modules.md) / default
[index.md - v2.1.1](../README.md) / [Exports](../modules.md) / default

# Class: default

Expand Down Expand Up @@ -36,7 +36,7 @@

#### Defined in

[index.ts:50](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L50)
[index.ts:50](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L50)

## Properties

Expand All @@ -46,7 +46,7 @@

#### Defined in

[index.ts:48](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L48)
[index.ts:48](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L48)

---

Expand All @@ -56,7 +56,7 @@

#### Defined in

[index.ts:49](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L49)
[index.ts:49](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L49)

---

Expand All @@ -66,7 +66,7 @@

#### Defined in

[index.ts:47](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L47)
[index.ts:47](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L47)

---

Expand All @@ -76,7 +76,7 @@

#### Defined in

[index.ts:46](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L46)
[index.ts:46](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L46)

## Methods

Expand All @@ -97,7 +97,7 @@

#### Defined in

[index.ts:60](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L60)
[index.ts:60](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L60)

---

Expand All @@ -111,7 +111,7 @@

#### Defined in

[index.ts:91](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L91)
[index.ts:91](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L91)

---

Expand All @@ -125,4 +125,4 @@

#### Defined in

[index.ts:102](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L102)
[index.ts:102](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L102)
22 changes: 11 additions & 11 deletions docs/interfaces/Options.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[index.md - v2.1.0](../README.md) / [Exports](../modules.md) / Options
[index.md - v2.1.1](../README.md) / [Exports](../modules.md) / Options

# Interface: Options

Expand Down Expand Up @@ -27,7 +27,7 @@ vue3.0 app

#### Defined in

[index.ts:30](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L30)
[index.ts:30](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L30)

---

Expand All @@ -39,7 +39,7 @@ children

#### Defined in

[index.ts:15](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L15)
[index.ts:15](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L15)

---

Expand All @@ -51,7 +51,7 @@ vue2.0 context

#### Defined in

[index.ts:34](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L34)
[index.ts:34](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L34)

---

Expand All @@ -61,7 +61,7 @@ vue2.0 context

#### Defined in

[index.ts:17](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L17)
[index.ts:17](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L17)

---

Expand All @@ -71,7 +71,7 @@ vue2.0 context

#### Defined in

[index.ts:18](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L18)
[index.ts:18](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L18)

---

Expand All @@ -83,7 +83,7 @@ parent context

#### Defined in

[index.ts:42](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L42)
[index.ts:42](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L42)

---

Expand All @@ -93,7 +93,7 @@ parent context

#### Defined in

[index.ts:16](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L16)
[index.ts:16](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L16)

---

Expand All @@ -105,7 +105,7 @@ propsData

#### Defined in

[index.ts:11](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L11)
[index.ts:11](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L11)

---

Expand All @@ -117,7 +117,7 @@ tagName of mount target, default: div

#### Defined in

[index.ts:26](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L26)
[index.ts:26](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L26)

---

Expand All @@ -129,4 +129,4 @@ mount target

#### Defined in

[index.ts:22](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L22)
[index.ts:22](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L22)
10 changes: 5 additions & 5 deletions docs/modules.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[index.md - v2.1.0](README.md) / Exports
[index.md - v2.1.1](README.md) / Exports

# index.md - v2.1.0
# index.md - v2.1.1

## Table of contents

Expand All @@ -26,7 +26,7 @@

#### Defined in

[index.ts:5](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L5)
[index.ts:5](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L5)

---

Expand All @@ -36,7 +36,7 @@

#### Defined in

[index.ts:4](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L4)
[index.ts:4](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L4)

---

Expand All @@ -46,4 +46,4 @@

#### Defined in

[index.ts:6](https://github.com/saqqdy/vue-mount-plugin/blob/4e7d820/src/index.ts#L6)
[index.ts:6](https://github.com/saqqdy/vue-mount-plugin/blob/301dc36/src/index.ts#L6)
Loading

0 comments on commit e78a3c6

Please sign in to comment.