Giter Club home page Giter Club logo

webpack-zookeeper-upload-plugin's Introduction

webpack-zookeeper-upload-plugin

Webpack plugin for uploading static resources to the zookeeper server

Usage

Install

npm i -D webpack-zookeeper-upload-plugin

Config

  • import
const zkUploadPlugin = require('webpack-zookeeper-upload-plugin');
  • config
plugins: [
  new zkUploadPlugin({
    // 静态文件地址目录,文件名不用传,直接使用webpack assets里面的;
    // 如果静态文件上传时使用了hash来做目录名,可以使用[hash]拼接在合适的位置,在上传至zk服务器时会自动替换;
    // 例如:静态文件地址为: https://cdn.com/9c371e67cb62ffbc037e/index.html,
    // 此时[hash]在上传至zk时会被替换为9c371e67cb62ffbc037e
    remoteUrl: 'https://cdn.com/[hash]/',
    zkIp: '127.0.0.1', // zk 地址
    dataDir: '/configs/static/', // 文件存储目录
    // 要上传的文件,如果不传或者传空,默认上传complie后的所有文件
    files: [
      {
        compliedFileName: 'index.html', // complie后的文件名
        zkPathFileName: 'manager.html' // 上传至zk后的文件名,可用来重命名文件
      }
    ]
  });
]

webpack-zookeeper-upload-plugin's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.