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

sftp-uploader

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sftp-uploader

sftp-uploader

  • 0.1.0
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by22.22%
Maintainers
1
Weekly downloads
 
Created
Source

sftpupload

引入

yarn add sftp-uploader
npm i sftp-uploader

配置

// vue.config.js
const sftpUploader = require('sftp-uploader')
module.exports = {
  configureWebpack: config => {
    return {
      plugins: [
        new sftpUploader({
          // 需要上传文件的目录
          dir: path.join(__dirname, 'dist/'),
          // 上传到的目录
          url: '******',
          // sftp地址
          host: '*****',
          // sftp端口
          port: '*****',
          // 账号
          username: '*****',
          // 密码
          password: '*****',
          // 文件过滤器,可以过滤掉不需要的文件,返回false将不会上传该文件(可选)
          filterFile(path) => {
            return path.endsWith(.gz) ? true : false
          }
        })
      ]
    }
  }
}

// package.json
"scripts": {
  "build": "vue-cli-service build --mode development",
  "deploy": "set UPLOAD=true && yarn build"
}

// 打包并上传
yarn deploy

使用

// 打包并上传
yarn deploy

FAQs

Package last updated on 03 Dec 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