GithubHelp home page GithubHelp logo

zechau / publish-sftp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xiaoxiaojx/publish-sftp

0.0 0.0 0.0 11 KB

One-line command to quickly publish resources to a specified server

JavaScript 100.00%

publish-sftp's Introduction

Logo

One-line command to quickly publish resources to a specified server..

NPM Version Package License NPM Downloads

Usage

Add sftp.json to the root of the project

// ./sftp.json
{
    "localPath": "./dist",
    "remotePath": "/export/App/xxx",
    "protectedRemotePath": "/export/App/xxx",
    "connect": {
        "host": "xxx.xxx.xxx.xx",
        "port": 22,
        "username": "root",
        "password": "123456"
    }
}

Getting started

yarn add publish-sftp

image

复制 localPath 下所有文件到 remotePath/xjx/test, -c 参数为空则是复制到 remotePath, 远程目录不存在会先创建

copy

复制 localPath 下所有文件到 remotePath 目录下, 如果 xxx 有值则是复制到 ${remotePath}/${xxx} 目录

publish-sftp -c xxx

remove

删除 remotePath 目录, 如果 xxx 有值则是删除 ${remotePath}/${xxx} 目录

publish-sftp -r xxx

Tips

protectedRemotePath 字段为避免误操作增加,删除等危险操作涉及到该目录会立即终止 ⚠️

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.