Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mini-app-zip-plugin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mini-app-zip-plugin

zip after webpack build for mini app

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

mini-app-zip-plugin

  • webpack 打包后直接生成 zip
  • 可以添加 app.json 等非打包文件进 zip
  • 打包后的结构,能直接上传 酷狗小程序开放平台

##安装

npm i mini-app-zip-plugin

##用法 在 webpack 的 plugin config 中使用

// in your webpack config
const miniAppZipPlugin = require('mini-app-zip-plugin');

plugins: [
    new miniAppZipPlugin(
        {
            r: [
                {
                  name: "test",
                  content: ["css/test.[hash].css", "js/common.[hash].js", "js/index.[hash].js", "js/test.[hash].js", "js/vendor.[hash].js", "index.html", "../app.json"]
                },
                {
                  name: "test2",
                  content: ["css/test2.[hash].css", "js/common2.[hash].js", "js/index2.[hash].js", "index.html", "../app2.json"]
                }
            ], 
            t: "../dist", 
            d: "../dist"
        }
    )
]

##参数说明

  • r: 打包规则,对象数组,有 n 个 打 n 个包
    • name: 打包后 zip 名称
    • content: 需要打包的内容,数组
  • t: 目标所在路径,content 中的所有内容路径相对与此路径
  • d: 打包完 zip 放置路径

##License MIT

Keywords

FAQs

Package last updated on 13 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc