GithubHelp home page GithubHelp logo

imaginarystargazer / remote-sync Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yongkangchen/remote-sync

0.0 0.0 0.0 1.09 MB

Upload your files to remote host after every change. Both SCP/SFTP and FTP are supported.

Home Page: https://atom.io/packages/remote-sync

License: MIT License

CoffeeScript 97.13% CSS 2.87%

remote-sync's Introduction

Atom Remote Sync

Atom Remote Sync Atom.io GitHub stars GitHub license GitHub issues

Use SFTP and FTP features inside Atom, having the ability to upload and download files directly from inside Atom.

Features

  • Uploading/downloading files to/from the server
  • Displaying diffs between the local and remote files with your favourite diff tool
  • Monitoring files for external changes and automatically uploading - useful for scss/less compiling
  • Support for both SCP/SFTP and FTP

Extras

  • Toggle for uploading changes automatically when you save a file
  • Define files to be monitored to be automatically monitoring
  • Set difftoolCommand in AtomSettingView of remote-sync -- The path to your diff tool executable
  • Toggle the logs for extra information
  • Toggle the hiding and showing of the log panel
  • Set custom config name

Installation

You can install this like any other Atom package, with one of these methods:

Via Atom (recommended)

  • Open Atom

  • Open settings

    • ctrl+, | cmd+,
    • Edit > Preferences (Linux)
    • Atom > Preferences (OS X)
    • File > Preferences (Windows)
  • Select "Install" tab

  • Search for remote-sync and click install

APM - terminal

  • Open a terminal
  • Run apm install remote-sync

Manually

  • Download / clone this repository to your ~/.atom/packages/
  • Enter the directory
  • Run apm install

Usage

You can configure remote sync a couple of ways:

Existing project

Via Atom (recommended)

  1. Right click main project folder
  2. Navigate to Remote Sync > Configure
  3. Fill in the details / select options
  4. Hit save

Manually

  1. Add a file named .remote-sync.json to your project
  2. Add/configure with one of the contents below
  3. Save the file

From scratch, with a remote server

  1. Follow setups for creating existing project - see above
  2. Right click main project folder
  3. Navigate to Remote Sync > Download folder

Options

The .remote-sync.json in your project root will use these options:

Option Datatype Default Details
transport String "" scp for SCP/SFTP, or ftp for FTP
hostname String "" Remote host address
port String "" Remort port to connect on (typically 22 for SCP/SFTP, 21 for FTP)
username String "" Remote host username
password String "" Remote host password
keyfile String "" Absolute path to SSH key (only used for SCP)
secure Boolean false Set to true for both control and data connection encryption (only used for FTP)
passphrase String "" Passphrase for the SSH key (only used for SCP)
useAgent String false Whether or not to use an agent process (only used for SCP)
target String "" Target directory on remote host
source String "" Source directory relative to project root
ignore Array [".remote-sync.json",".git/**"] Array of minimatch patterns of files to ignore
watch Array [] Array of files (relative to project root - starting with "/") to watch for changes
uploadMirrors Array [] Transport mirror config array when upload
uploadOnSave Boolean false Whether or not to upload the current file when saved
saveOnUpload Boolean false Whether or not to save a modified file before uploading
useAtomicWrites Boolean false Upload file using a temporary filename before moving to its final location (only used for SCP)
deleteLocal Boolean false Whether or not to delete the local file / folder after remote delete

Example configuration's

SCP example:

{
  "transport": "scp",
  "hostname": "10.10.10.10",
  "port": 22,
  "username": "vagrant",
  "password": "vagrant",
  "keyfile": "/home/vagrant/.ssh/aws.pem",
  "passphrase": "your_passphrase",
  "target": "/home/vagrant/dirname/subdirname",
  "ignore": [
    ".remote-sync.json",
    ".git/**"
  ],
  "watch":[
    "/css/styles.css",
    "/index.html"
  ]
}

SCP useAgent example:

{
  "transport": "scp",
  "hostname": "10.10.10.10",
  "port": 22,
  "username": "vagrant",
  "useAgent": true,
  "target": "/home/vagrant/dirname/subdirname",
  "ignore": [
    ".remote-sync.json",
    ".git/**"
  ],
  "watch":[
    "/css/styles.css",
    "/index.html"
  ]
}

FTP example:

{
  "transport": "ftp",
  "hostname": "10.10.10.10",
  "port": 21,
  "username": "vagrant",
  "password": "vagrant",
  "target": "/home/vagrant/dirname/subdirname",
  "ignore": [
    ".remote-sync.json",
    ".git/**"
  ],
  "watch":[
    "/css/styles.css",
    "/index.html"
  ]
}

Upload mirrors example:

{
  "transport": "scp",
  "hostname": "10.10.10.10",
  "port": 22,
  "username": "vagrant",
  "password": "vagrant",
  "keyfile": "/home/vagrant/.ssh/aws.pem",
  "passphrase": "your_passphrase",
  "target": "/home/vagrant/dirname/subdirname",
  "ignore": [
    ".remote-sync.json",
    ".git/**"
  ],
  "watch":[
    "/css/styles.css",
    "/index.html"
  ],
  "uploadMirrors":[
    {
      "transport": "scp",
      "hostname": "10.10.10.10",
      "port": 22,
      "username": "vagrant",
      "password": "vagrant",
      "keyfile": "/home/vagrant/.ssh/aws.pem",
      "passphrase": "your_passphrase",
      "target": "/home/vagrant/dirname/subdirname_one",
      "ignore": [
        ".remote-sync.json",
        ".git/**"
      ]
    },
    {
      "transport": "ftp",
      "hostname": "10.10.10.10",
      "port": 21,
      "username": "vagrant",
      "password": "vagrant",
      "target": "/home/vagrant/dirname/subdirname_two",
      "ignore": [
        ".remote-sync.json",
        ".git/**"
      ]
    }
  ]
}

Make a donation via Paypal Make a donation via Paypal

Click 'Send Money' after login PayPal, and my PayPal account is: lx1988cyk#gmail.com

remote-sync's People

Contributors

clonn avatar daverickdunn avatar dschwen avatar elistone avatar gawdl3y avatar jany-m avatar kambing86 avatar laymance avatar leobasilio avatar levythu avatar mgcrea avatar nfour avatar peppy avatar qinming avatar rajendrant avatar tamcap avatar thesysadmin avatar vslinko avatar wescossick avatar yongkangchen avatar zkwentz 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.