1.0.1 • Published 3 years ago

create-web-version-zip v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

create-web-version-zip

$ One-click automatic generation of template files(打包自动生成版本以及对应的静态资源压缩包)

install

$ npm install create-web-version-zip -D

OR

$ yarn add create-web-version-zip -D

Example:

Created packageZip.js in the project. example: In the root directory(在项目中创建packageZip.js.比如在根目录/) 

// packageZip.js   

const packageZip = require('create-web-version-zip');
const path = require('path');
const staticFilesPath = path.resolve(process.cwd(), 'dist'); // 静态文件夹路径
const versionDirName = 'static'; // 存放版本zip及版本信息的目录名称, 该目录存放在静态文件夹下
packageZip(staticFilesPath, versionDirName);

// package.json
"scripts": { 
    "build": "vue-cli-service build && node packageZip.js"
}