# vue-cli-plugin-pack

> 此插件为 **vue-cli** 的扩展，用于在 **vue-cli-service build** 命令执行的最后阶段，也就是 vue-cli 内部的 webpack 的 **done** 钩子触发的时候，对构建产出目录进行 zip 打包，打包出来的文件名为使用此插件的当前项目的根目录的 package.json 中的 projectName 配置 + 当前日期(**{projectName}_{format}.zip**)

Latest version **1.0.6** (published 2022-12-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-cli-plugin-pack
pnpm add vue-cli-plugin-pack
yarn add vue-cli-plugin-pack
bun add vue-cli-plugin-pack
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2022-12-30 |
| First published | 2022-11-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | yali |

## Links

- npm: https://www.npmjs.com/package/vue-cli-plugin-pack
- Repository: https://gitee.com/yali__home/vue-cli-plugin-pack
- npm.io page: https://npm.io/package/vue-cli-plugin-pack

## Dependencies (1)

- [plugin-utils-core](https://npm.io/package/plugin-utils-core.md) ^1.0.21

## Recent versions

- 1.0.6 (latest) — 2022-12-30
- 1.0.5 — 2022-12-29
- 1.0.4 — 2022-12-04
- 1.0.3 — 2022-12-04
- 1.0.1 — 2022-11-22
- 1.0.0 — 2022-11-22

## README

###  插件简介

此插件为 **vue-cli** 的扩展，用于在 **vue-cli-service build** 命令执行的最后阶段，也就是 vue-cli 内部的 webpack 的 **done** 钩子触发的时候，对构建产出目录进行 zip 打包，打包出来的文件名为使用此插件的当前项目的根目录的 package.json 中的 projectName 配置 + 当前日期(**{projectName}_{format}.zip**)

###  插件安装

```
 npm install vue-cli-plugin-pack
```

### 插件使用

根据 vue-cli 插件的运行原理，项目根目录的 package.json 文件中的 dependencies 或 devDependencies 中一定要有 vue-cli-plugin-pack ，否则此插件不会生效；
确保项目根目录的 package.json 文件中的 dependencies 或 devDependencies 中有 vue-cli-plugin-pack 后，在项目的 vue.config.js 文件中，引入如下代码：

```
const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
    pluginOptions:  {
        pack: {
            format: 'YYYY-MM-DD_HH时mm分ss秒',
            enable: true
        }
    }
})
```

### 插件配置

此插件目前就只有 2 个配置 

```
{
    format: 'YYYY-MM-DD_HH时mm分ss秒',  //打包后的文件名中的日期的格式，因插件依赖 moment 包，故此配置与 moment 包的格式一致
    enable: true  //插件的禁用和启用，默认值为 true(启用)
}
```

---
_Source: https://npm.io/package/vue-cli-plugin-pack · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
