Giter Site home page Giter Site logo

atom-sync's Introduction

atom-sync package

atom-sync is an Atom package to sync files bidirectionally between remote host and local over ssh+rsync. Inspired by Sublime SFTP.

experimentalBuild Status

This package is currently in early development and has only been tested on Mac. Please kindly try it out and provide feedback.

atom-sync

Feature

  • Sync over ssh+rsync — still secure, but much faster.
  • Multi-Folder Projects with different sync config files supported
  • Triggers conditionally run commands after successful uploading

Prerequisite

  • Ensure you have ssh and rsync installed.

Quick Start

  • Open a project folder to sync in Atom.
  • Right click on the project folder and select Sync -> Edit Remote Config.
  • Edit and save the config file.
  • Right click on the project folder and select Sync -> Sync Remote -> Local.
  • Watch water flows.

Notice

Config File (and Tutorial)

.sync-config.cson

remote:
    host: "HOSTNAME",       # server name or ip or ssh host abbr in .ssh/config
    user: "USERNAME",       # ssh username
    path: "REMOTE_DIR"      # e.g. /home/someone/somewhere

behaviour:
    uploadOnSave: true      # Upload every time you save a file
    syncDownOnOpen: true    # Download every time you open a file
    forgetConsole: false    # Never show console panel even while syncing
    autoHideConsole: true   # Hide console automatically after 1.5s
    alwaysSyncAll: false    # Sync all files and folders under the project \
                            # instead of syncing single file or folder
option:
    deleteFiles: true       # Delete files during syncing
    autoHideDelay: 1500     # Time delay to hide console
    exclude: [              # Excluding patterns
        '.sync-config.cson'
        '.git'
        'node_modules'
        'tmp'
        'vendor'
    ]
    flags: 'avzpur'         # Advanced option: rsync flags
    shell: 'ssh'
trigger:                    # Triggers fire after uploading file successfully
                            # which STARTS with following patterns

    "*": "uptime"            # Wildcard trigger for any file uploaded

    "resources/scripts/coffee": [   # Any file under %PROJECT_ROOT%/resources/scripts/coffee \
                                    # being uploaded will fire this trigger

        "echo Compile coffeescript to js ..."
        "coffee -b --output js/ --compile coffee/"
        "ls public/js/|xargs -I@ echo \\t@"       # You can also pipe commands but don't \
                                                  # forget to escape special characters
    ]
    "resources/scripts/sass": [
        "echo Compile sass to css ..."
        "sass --update resources/scripts/sass:public/css"
    ]

Introduction to Trigger

Config

trigger:
    "*": [
        "echo \'<span class=warning>Every time you\\'ll see me</span>\'"
    ]
    "coffee": [
        "echo Compile coffeescript to js ..."
        "mkdir -p js"
        "coffee -b --output js/ --compile coffee/"
        "ls js/|xargs -I@ echo \\t@"
    ]
    "sass/style.sass": [
        "echo Compile sass to css ..."
        "mkdir -p css"
        "sass --update sass:css"
    ]

Result

trigger

Suggestion

Trigger is implemented via ssh, it would be great to use triggers with SSH ControlMaster by transferring data through single ssh tunnel instead of making one ssh connection for rsync and another for ssh command, which could be very slow under unideal network speed or connection limits.

Config sample of ~/.ssh/config
Host *
    ControlMaster auto
    ControlPath ~/.ssh/ssh-%r@%h:%p
    ControlPersist 10m
    ServerAliveInterval 30

Keybindings

  • ctrl+alt+l (Windows/Linux) cmd+alt+l (Mac) Toggle log window

Known Problems

  • You have to Sync Local -> Remote manually after renaming and deleting files.

Roadmap

  • Listen to events
    • Create folders
    • Rename files/folders
    • What about deleting?

atom-sync's People

Contributors

dingjie avatar dpavlic avatar hultberg avatar willf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atom-sync's Issues

More specific list of excluded

When put a element in excluded list, it exclude recursive in all folders. It's posible be more specific like select only a file or a directory?
For example i need exclude a folder called web in project root but not exclude a folder _web_ in other directory.

Uncaught Error: Cannot find module '../service/undefined'

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.7.4
System: Mac OS X 10.11.5
Thrown From: atom-sync package, v0.7.3

Stack Trace

Uncaught Error: Cannot find module '../service/undefined'

At module.js:340

Error: Cannot find module '../service/undefined'
    at Module._resolveFilename (module.js:338:15)
    at Function.Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app.asar/src/module-cache.js:383:52)
    at Function.Module._load (module.js:289:25)
    at Module.require (module.js:366:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.module.exports.ServiceController.sync (/Users/bearteddy/.atom/packages/atom-sync/lib/controller/service-controller.coffee:93:10)
    at Object.module.exports.ServiceController.onSync (/Users/bearteddy/.atom/packages/atom-sync/lib/controller/service-controller.coffee:66:22)
    at atom-workspace.subscriptions.add.atom.commands.add.atom-sync:download-directory (/Users/bearteddy/.atom/packages/atom-sync/lib/atom-sync.coffee:27:25)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1106:28)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/application-delegate.js:327:25)
    at emitThree (events.js:97:13)
    at EventEmitter.emit (events.js:175:7)

Commands

     -0:01.2.0 atom-sync:download-directory (div.header.list-item)

Config

{
  "core": {
    "disabledPackages": [
      "Tern",
      "remote-edit",
      "git-status-utils",
      "npm",
      "close-tags",
      "git-control",
      "node-debugger",
      "ex-mode",
      "jshint",
      "activate-power-mode",
      "minimap",
      "open-on-github",
      "file-type-icons",
      "highlight-selected",
      "pane-by-type",
      "swackets"
    ],
    "packagesWithKeymapsDisabled": []
  }
}

Installed Packages

# User
atom-alignment, v0.12.1
atom-backbone, v0.6.1
atom-html-preview, v0.1.19
atom-jshint, v2.0.0
atom-sync, v0.7.3
atom-ternjs, v0.14.1
autoclose-html, v0.23.0
autocomplete-clang, v0.9.3
autocomplete-json, v5.0.2
autocomplete-modules, v1.5.1
background-tips, v0.26.0
build, v0.64.0
build-npm-apm, v0.12.0
busy, v0.5.0
clipboard-plus, v0.5.1
cursor-history, v0.5.9
file-types, v0.5.1
grammar-token-limit, v0.1.1
javascript-snippets, v1.2.1
language-ejs, v0.2.0
language-qml, v1.0.0
language-qtpro, v0.6.0
linter, v1.11.4
linter-clang, v3.4.4
merge-conflicts, v1.4.3
open-recent, v5.0.0
pigments, v0.29.0
project-manager, v2.9.7
symbols-tree-view, v0.13.1
sync-settings, v0.7.2
tabular, v0.1.0
terminal-plus, v0.14.5
underscorejs-snippets, v0.2.2
vim-mode, v0.65.1
vim-mode-clipboard-plus, v0.2.0
vim-mode-visual-block, v0.2.15
vim-surround, v0.8.1

# Dev
No dev packages

Option to always sync from root directory

Thank you for a very nice plugin!

I am wondering if you can possibly add an option to always sync the project entire projekt when saving a file (uploadOnSave).

If I am working on a file in a sub folder, the plugin only syncs that sub folder. It would be nice to have an option in the config file (.sync-config.cson) to always sync the entire projekt to the remote server, no matter where the saved file is located in the project.

I hope you understand what I mean. If not, I will gladly elaborate!

Add PORT config field

I would like to connect through 2200 as this is the most common routing used with virtualboxes to "reverse proxy" connection from the host machine :)

doesn't work on osx sierra rsync 3.1.2

I just upgraded osx to version 10.12.3 and now syncing doesn't work anymore.
I Keep getting this error..
SH connection failed, please review your config file.

is there a solution for this?

Thanx,

"Include files" functionality

Complementary to the "Exclude files" functionality it would be awesome to have the option to include files, since sometimes I just want to sync very specific files and folders.

Different stages?

First of all: thanks for this great package, works like a charm!

One feature that would be greate are different stages - like Development and Production or something like this. Is that possible? Or a stupid idea with rsync? ;)

thank you!

A complete how to configure step to step

I think that I've correctly configured, because before try this plugin I was using Remote Sync in the same way you recommend to use your plugin, but your plugin don't want work. Always say me: "SSH connection failed, please review your config file."

My key is added and working good using "ssh localhost" without asking password, and using Remote Sync.

Uncaught TypeError: path must be a string

  1. Installed atom-sync via apm
  2. Restarted Atom
  3. Disabled remote-sync plugin
  4. Switched to project and right clicked folder , sync -> edit sync config

Atom Version: 1.3.2
System: Mac OS X 10.10.5
Thrown From: atom-sync package, v0.5.2

Stack Trace

Uncaught TypeError: path must be a string

At fs.js:549

TypeError: path must be a string
    at TypeError (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.module.(anonymous function) [as openSync] (ATOM_SHELL_ASAR.js:137:20)
    at Object.fs.writeFileSync (fs.js:1171:15)
    at Object.fsPlus.writeFileSync (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/fs-plus/lib/fs-plus.js:279:17)
    at Object.module.exports.ConfigHelper.initialise (/Users/korny/.atom/packages/atom-sync/lib/helper/config-helper.coffee:10:16)
    at Object.module.exports.ServiceController.onCreate (/Users/korny/.atom/packages/atom-sync/lib/controller/service-controller.coffee:23:17)
    at HTMLDivElement.subscriptions.add.atom.commands.add.atom-sync:configure (/Users/korny/.atom/packages/atom-sync/lib/atom-sync.coffee:12:25)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1016:28)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)
    at EventEmitter.ipc.sendSync (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/ipc.js:21:31)
    at BrowserWindow.RemoteMemberFunction [as emit] (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:143:29)
    at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/context-menu-manager.js:156:33)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentContextmenu (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:250:47)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:02.7.0 atom-sync:configure (span.name.icon.icon-repo)

Config

{
  "core": {
    "themes": [
      "predawn-ui",
      "twilight-syntax-spacegray-eighties"
    ],
    "disabledPackages": [
      "wrap-guide",
      "linter-rails-best-practices",
      "linter-pep8",
      "pigments",
      "linter-php",
      "remote-sync"
    ]
  }
}

Installed Packages

# User
atom-jinja2, v0.5.0
atom-sync, v0.5.2
bookmarks, v0.38.0
editorconfig, v1.2.2
emmet, v2.3.14
file-icons, v1.6.11
jshint, v1.8.3
language-sass, v0.45.0
linter, v1.11.2
linter-csslint, v1.1.0
linter-erb, v0.1.1
linter-jshint, v1.2.1
linter-jslint, v10.0.0
linter-jsonlint, v1.0.1
linter-phpmd, v1.3.2
linter-tidy, v1.0.1
predawn-ui, v1.0.2
project-manager, v2.6.5
sass-autocompile, v0.11.0
terminal-plus, v0.14.5
twilight-syntax-spacegray-eighties, v0.3.0

# Dev
settings-view, v0.224.0

Feature: key file

I have to use a pem key file when connecting to my AWS EC2 instance via SSH. How can I include the pem file in your extension config?

Uncaught TypeError: undefined is not a function

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.208.0
System: Mac OS X 10.10.4
Thrown From: atom-sync package, v0.4.1

Stack Trace

Uncaught TypeError: undefined is not a function

At /Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:759

TypeError: undefined is not a function
    at Object.module.exports.ConfigHelper.getCurrentProjectDirectory (/Users/admin/.atom/packages/atom-sync/lib/helper/config-helper.coffee:71:62)
    at Object.module.exports.ConfigHelper.getFullPath (/Users/admin/.atom/packages/atom-sync/lib/helper/config-helper.coffee:59:19)
    at Object.module.exports.ConfigHelper.load (/Users/admin/.atom/packages/atom-sync/lib/helper/config-helper.coffee:20:19)
    at Object.module.exports.ServiceController.uploadEditingFile (/Users/admin/.atom/packages/atom-sync/lib/controller/service-controller.coffee:28:28)
    at /Users/admin/.atom/packages/atom-sync/lib/atom-sync.coffee:62:37
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
    at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1016:20)
    at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:998:19)
    at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:579:26)
    at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:523:18)
    at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:506:19)
    at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:585:35)
    at atom-workspace.atom.commands.add.core:save (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace-element.js:317:30)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22)
    at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:177:20)

Commands

     -4:52.4.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
     -4:52.4.0 editor:newline (atom-text-editor.editor.is-focused)
     -4:52.3.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
     -4:52.3.0 editor:newline (atom-text-editor.editor.is-focused)
     -4:52.1.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
     -4:52.1.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:02.5.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:01.5.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "one-dark-dim-syntax"
    ],
    "disabledPackages": [
      "atom-css-class-checker",
      "atom-css-class-checker",
      "atom-css-class-checker",
      "atom-css-class-checker"
    ]
  }
}

Installed Packages

# User
Remote-FTP, v0.7.1
atom-sync, v0.4.1
autocomplete-php, v0.3.6
browser-plus, v0.0.23
css-snippets, v0.8.0
emmet, v2.3.10
file-icons, v1.5.7
language-smarty-php, v0.5.0
linter-php, v0.0.15
linter-phpcs, v0.0.15
one-dark-dim-syntax, v0.1.0
php-introspector, v1.0.0
save-session, v0.15.5
tool-bar, v0.1.7
tool-bar-main, v0.0.8

# Dev
No dev packages

Keybinding for sync all

Please consider adding a keybinding to sync the whole project. It's kinda irritating having to right-click on the project root folder then clicking "Upload directory" when sass is watching from the terminal.

Feature: local sync

Hi,

I'd love to sync files locally: I edit my project files but I don't want them to be messed up with the website that I use to test locally. And I'd like not to have to set up sshd on my computer since it does not make sense to use SSH to connect locally...

Seems like just not using SSH is enough, since RSYNC can work locally.

Feature: local path

Using popular build scripts (like the one that comes with foundation 6), there is a /dist/ folder that contains the entire produced site and is purged at each compilation.

Now I would like to sync local/dist directly to remote/public_html.

The logical way would be to put the .sync-config.cson into local/dist.
But I can't do that, as the build script deletes local/dist all the time.

A solution would be that you can't only place the cson in the targetted directory, but also specify a path you want to sync.

remote:
  host: "server"
  user: "username"
  path: "/home/user/public_html/"
local:
  path: "/dist"

What do you think?

'cmd.exe' could not be spawned.

'cmd.exe' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process.

I'm trying to get this thing working on Windows. When clicking the Sync Remote -> Local it gives me that error.

Allow multiple remotes

It would be nice to have multiple remotes for one project.
For example one for server and another for backup.

atom-sync get error that tree-view panel closed

[Enter steps to reproduce below:]

  1. use command+\ to close tree-view panel
  2. save to upload file

Atom Version: 1.3.2
System: Mac OS X 10.11.1
Thrown From: atom-sync package, v0.5.2

Stack Trace

Uncaught TypeError: Cannot read property 'indexOf' of undefined

At /Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:829

TypeError: Cannot read property 'indexOf' of undefined
    at Object.module.exports.ConfigHelper.isExcluded (/Users/leozhao/.atom/packages/atom-sync/lib/helper/config-helper.coffee:33:20)
    at Object.module.exports.ServiceController.onSync (/Users/leozhao/.atom/packages/atom-sync/lib/controller/service-controller.coffee:44:20)
    at Object.module.exports.ServiceController.onSave (/Users/leozhao/.atom/packages/atom-sync/lib/controller/service-controller.coffee:27:10)
    at /Users/leozhao/.atom/packages/atom-sync/lib/atom-sync.coffee:31:29
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:86:11)
    at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1060:27)
    at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1030:19)
    at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:588:26)
    at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:534:18)
    at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:517:19)
    at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:633:35)
    at atom-workspace.commandRegistry.add.core:save (/Applications/Atom.app/Contents/Resources/app.asar/src/register-default-commands.js:173:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -8:50.1.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
     -8:50.1.0 editor:newline (atom-text-editor.editor.is-focused)
  8x -8:48.9.0 core:backspace (atom-text-editor.editor.is-focused)
     -8:05.6.0 settings-view:open (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
  2x -0:33.6.0 tree-view:toggle (button.btn.btn-default.icon.icon-link)
     -0:06.1.0 core:save (atom-text-editor.editor.is-focused)
     -0:04.0 tree-view:toggle (atom-text-editor.editor.is-focused)
     -0:03.4.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "activate-power-mode",
      "project-sidebar"
    ],
    "themes": [
      "atom-material-ui",
      "atom-material-syntax"
    ],
    "openEmptyEditorOnStart": false
  }
}

Installed Packages

# User
atom-beautify, v0.28.19
atom-jade, v0.3.0
atom-material-syntax, v0.2.10
atom-material-ui, v0.8.0
atom-sync, v0.5.2
emmet, v2.3.17
file-icons, v1.6.13
git-log, v0.4.1
highlight-selected, v0.11.1
language-babel, v2.6.2
minimap, v4.18.1
pigments, v0.19.3
project-manager, v2.6.5
rest-client, v0.5.0
sync-settings, v0.6.0

# Dev
No dev packages

Pre-sync triggers

It can be useful to run triggers locally before syncing.

E.g. I would like to run all my build steps (like minify) locally rather than remotely.

Please add watch file

Hello. Please add watch file in project via glob /*/.css.
This need if you use local build. AlwaysSyncAll nice, but slow.

Uncaught TypeError: Cannot read property 'length' of undefined

[Enter steps to reproduce:]

  1. Download atom-sync package
  2. Right-click folder to sync, choose any option.

Atom: 1.15.0 x64
Electron: 1.3.13
OS: Fedora 25
Thrown From: atom-sync package 0.7.3

Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At /home/mkoser/.atom/packages/atom-sync/lib/helper/config-helper.coffee:27

TypeError: Cannot read property 'length' of undefined
    at Object.isExcluded (/packages/atom-sync/lib/helper/config-helper.coffee:27:9)
    at Object.onSync (/packages/atom-sync/lib/controller/service-controller.coffee:49:27)
    at /packages/atom-sync/lib/atom-sync.coffee:27:25)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:3:59)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/app.asar/src/atom-environment.js:1168:28)
    at EventEmitter.outerCallback (/app.asar/src/application-delegate.js:325:25)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -3:19.9.0 tree-view:remove-project-folder (div.header.list-item.project-root-header)
     -3:18.3.0 application:add-project-folder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -3:08.5.0 atom-sync:configure (span.name.icon.icon-repo)
     -3:05.9.0 core:save (input.hidden-input)
     -2:53.2.0 atom-sync:upload-directory (span.name.icon.icon-repo)
  2x -0:14.5.0 atom-sync:download-directory (span.name.icon.icon-repo)

Non-Core Packages

atom-beautify 0.29.17 
atom-sync 0.7.3 
atom-uikit 1.2.2 
autocomplete-python 1.8.60 
emmet 2.4.3 
file-icons 1.7.25 
git-plus 7.0.7 
language-ansible 0.2.1 
language-cfml 0.17.0 
language-powershell 4.0.0 
markdown-writer 2.6.4 
merge-conflicts 1.4.4 
minimap 4.25.7 
multi-cursor 2.1.5 
pretty-json 1.6.1 
project-manager 3.3.3 
python-debugger 0.2.0 
remote-edit 1.9.0 
script 3.14.1 

enhancement: run command after sync

I love using this to sync files to my server after editing, but sometimes I need to run a build command afterward in order for the server to pick up the change (like less -> css), so I'd like to be able to eliminate that middle step so I can just alt+tab between atom and the browser.

Uncaught TypeError: Cannot read property 'indexOf' of undefined

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.211.0
System: Mac OS X 10.10.3
Thrown From: atom-sync package, v0.4.5

Stack Trace

Uncaught TypeError: Cannot read property 'indexOf' of undefined

At /Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:762

TypeError: Cannot read property 'indexOf' of undefined
  at Object.module.exports.ConfigHelper.isExcluded (/Users/dingjie/github/atom-sync/lib/helper/config-helper.coffee:33:20)
  at Object.module.exports.ServiceController.onSync (/Users/dingjie/github/atom-sync/lib/controller/service-controller.coffee:44:20)
  at Object.module.exports.ServiceController.onSave (/Users/dingjie/github/atom-sync/lib/controller/service-controller.coffee:27:10)
  at /Users/dingjie/github/atom-sync/lib/atom-sync.coffee:31:29
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:996:20)
  at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:978:19)
  at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:579:26)
  at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:523:18)
  at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:506:19)
  at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:592:35)
  at atom-workspace.atom.commands.add.core:save (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace-element.js:317:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:180:20)

Commands

  2x -0:45.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:28.8.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:28.8.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:26.9.0 core:close (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:14.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:05.9.0 core:move-right (atom-text-editor.editor.mini.is-focused)
     -0:05.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:03.2.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "isotope-ui",
      "tomorrow-night-eighties-syntax"
    ],
    "disabledPackages": []
  }
}

Installed Packages

# User
atom-beautify, v0.28.5
atom-sync, v0.4.5
autocomplete-php, v0.3.6
browser-plus, v0.0.23
coffee-compile, v0.16.1
color-picker, v2.0.7
css-snippets, v0.8.0
docs-snippets, v0.8.0
emmet, v2.3.10
file-icons, v1.5.7
fonts, v0.4.2
isotope-ui, v2.4.1
linter, v0.12.7
linter-csslint, v0.0.13
linter-htmlhint, v0.0.16
linter-jshint, v0.1.6
linter-less, v0.5.0
linter-php, v0.0.15
minimap, v4.10.0
minimap-find-and-replace, v4.2.0
pigments, v0.8.0
project-manager, v1.15.10
tomorrow-night-eighties-syntax, v0.6.1

# Dev
No dev packages

Exclude files using match() instead of indexOf()

In the code, you use IndexOf() for pattern matching of exclude list:

isExcluded: (str, exclude) ->
for pattern in exclude
return true if (str.indexOf pattern) isnt -1
return false

Why you didn't use match() ? maybe it is too slow in term of performances?

Actually, if you have a source file named MySource.cpp compiled in a binary named MySource, adding "MySource" to the exclude list means adding also MySource.cpp.
This isn't a big problem if MySource binary is small, otherwise using "Sync all folder" became a pity.

Uncaught ReferenceError: _ is not defined

Atom 1.8.0
Atom-sync: 0.7.3 (own fork)

Using the keybinding I added in atom-sync to sync the whole project.

ReferenceError: _ is not defined
    at Object.module.exports.AtomSync.getProjectPath (/Users/edvin/github/atom-sync/lib/atom-sync.coffee:61:5)
    at atom-workspace.subscriptions.add.atom.commands.add.atom-sync:upload-project (/Users/edvin/github/atom-sync/lib/atom-sync.coffee:23:24)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Uncaught TypeError: Cannot read property 'getItem' of undefined

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.208.0
System: Mac OS X 10.10.3
Thrown From: atom-sync package, v0.4.1

Stack Trace

Uncaught TypeError: Cannot read property 'getItem' of undefined

At /Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:759

TypeError: Cannot read property 'getItem' of undefined
  at Object.module.exports.ConfigHelper.getCurrentProjectDirectory (/Users/dingjie/github/atom-sync/lib/helper/config-helper.coffee:57:53)
  at Object.module.exports.ConfigHelper.getFullPath (/Users/dingjie/github/atom-sync/lib/helper/config-helper.coffee:46:17)
  at Object.module.exports.ConfigHelper.load (/Users/dingjie/github/atom-sync/lib/helper/config-helper.coffee:13:17)
  at Object.module.exports.ServiceController.uploadEditingFile (/Users/dingjie/github/atom-sync/lib/controller/service-controller.coffee:25:26)
  at /Users/dingjie/github/atom-sync/lib/atom-sync.coffee:31:29
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1016:20)
  at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:998:19)
  at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:579:26)
  at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:523:18)
  at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:506:19)
  at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:585:35)
  at atom-workspace.atom.commands.add.core:save (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace-element.js:317:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:177:20)

Commands

     -0:05.7.0 tree-view:toggle (atom-text-editor.editor.is-focused)
     -0:01.7.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "chester-atom-syntax"
    ]
  }
}

Installed Packages

# User
atom-beautify, v0.28.0
atom-sync, v0.4.1
atom-ternjs, v0.6.4
autocomplete-php, v0.3.6
chester-atom-syntax, v0.1.1
color-picker, v2.0.4
emmet, v2.3.10
file-icons, v1.5.7
fonts, v0.4.2
linter, v0.12.7
linter-csslint, v0.0.13
linter-htmlhint, v0.0.16
linter-jshint, v0.1.6
linter-less, v0.5.0
linter-php, v0.0.15
minimap, v4.9.4
minimap-find-and-replace, v4.2.0
travis-ci-status, v0.15.0

# Dev
No dev packages

Error in rsync protocol data stream, please review your config file.

Okay,

I've followed the steps, and sometimes this just works like a charm, and other times it gives me headaches galore. (And I've tested atomic-sync and the atom-sync when this troubles start)

ssh works fine, rsync works fine from the cli, but sync log shows:

Ready
Syncing from /Users/hvisage/Work/GlobalRemit/dotransaction-mysql/doTransaction.sql to hvisage@uat-ferari:/home/ferari/dev/dotransaction-mysql ...
Error in rsync protocol data stream, please review your config file.

Syncing from /Users/hvisage/Work/GlobalRemit/dotransaction-mysql/doTransaction.sql to hvisage@uatferari:/home/ferari/dev/dotransaction-mysql ...
Error in rsync protocol data stream, please review your config file

UploadOnSave not working

UploadOnSave does not work for me despite having uploadOnSave: trueon my '.sync-config.cson'. It first stopped working on an active project, then it stopped working on newly created projects as well.

Manually syncing does work.

I quickly tried to map a keybind for 'upload-file' without success, and did not find much information online.

Is this an issue (for which I can provide more info) or should I try a workaround (such as a keybind)?
Please let me know what info you need. Thank you.

testing on linux box

Just wanted to say I'm enjoying atom-sync very much. Testing on a couple Linux (ubuntu) boxes. Excellent so far. Will report back with more.

Thank you.

Uncaught TypeError: Cannot read property 'buffer' of undefined

[Enter steps to reproduce below:]

1.Try to upload project

Atom Version: 1.7.3
System: Ubuntu 14.04.4
Thrown From: atom-sync package, v0.7.3

Stack Trace

Uncaught TypeError: Cannot read property 'buffer' of undefined

At /home/dev/.atom/packages/atom-sync/lib/atom-sync.coffee:23

TypeError: Cannot read property 'buffer' of undefined
    at atom-workspace.subscriptions.add.atom.commands.add.atom-sync:upload-project (/home/dev/.atom/packages/atom-sync/lib/atom-sync.coffee:23:79)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:260:29)
    at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/usr/share/atom/resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:183:32)
    at CommandPaletteView.module.exports.SelectListView.confirmSelection (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
    at space-pen-div.atom.commands.add.core:confirm (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:260:29)
    at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/usr/share/atom/resources/app.asar/src/window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:20.5.0 settings-view:open (atom-pane.pane.active)
     -0:19.3.0 core:close (div.panels-item)
  2x -0:18.9.0 tree-view:toggle (atom-workspace.workspace.scrollbars-visible-always.panel-shadows.panel-contrast.use-animations.theme-one-light-syntax.theme-atom-material-ui)
     -0:17.5.0 fuzzy-finder:toggle-file-finder (atom-pane.pane.active)
     -0:17 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -0:17 core:cancel (atom-text-editor.editor.mini.is-focused)
     -0:16.4.0 command-palette:toggle (atom-pane.pane.active)
     -0:15 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:14.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:14.7.0 atom-sync:upload-project (atom-pane.pane.active)
     -0:05.4.0 tree-view:toggle (atom-pane.pane.active)
     -0:03.0 command-palette:toggle (atom-pane.pane.active)
     -0:00.9.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:00.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:00.7.0 atom-sync:upload-project (atom-pane.pane.active)

Config

{
  "core": {
    "disabledPackages": [
      "editor-background",
      "atom-terminal-panel",
      "emmet",
      "linter"
    ],
    "ignoredNames": [
      ".git",
      "node_modules",
      "vendor",
      "bower_components"
    ],
    "themes": [
      "atom-material-ui",
      "one-light-syntax"
    ]
  }
}

Installed Packages

# User
atom-material-ui, v1.2.11
atom-sync, v0.7.3
markdown-preview-plus, v2.4.0
pigments, v0.26.2
remote-edit, v1.8.24

# Dev
No dev packages

Sync files modified outside Atom

Is it possible to sync also files that are modified outside of Atom editor?
(E.g. if gulp is running in terminal and compiling sass files and doing other stuff)

PS: Thanks for this great plugin.

SSH Config in Windows?

While I configured successfuly ssh for Git under windows and it works perfectly, the config does not work for Atom. The config is in ~/.ssh/config but still nothing, while ssh from the git bash console works perfectly (as well chmod is fine)

Uncaught TypeError: Path must be a string. Received undefined

[Enter steps to reproduce below:]

  1. modify a file
  2. try to upload folder using Command Palette instead of context menu

Atom Version: 1.4.3
System: Mac OS X 10.11.3
Thrown From: atom-sync package, v0.6.0

Stack Trace

Uncaught TypeError: Path must be a string. Received undefined

At path.js:8

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:8:11)
    at Object.posix.normalize (path.js:448:3)
    at Object.module.exports.ServiceController.onSync (/Users/cento/.atom/packages/atom-sync/lib/controller/service-controller.coffee:34:20)
    at atom-workspace.subscriptions.add.atom.commands.add.atom-sync:upload-directory (/Users/cento/.atom/packages/atom-sync/lib/atom-sync.coffee:22:25)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:183:32)
    at CommandPaletteView.module.exports.SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
    at space-pen-div.atom.commands.add.core:confirm (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -1:31 editor:indent-selected-rows (atom-text-editor.editor.is-focused)
     -1:26.5.0 core:move-up (atom-text-editor.editor.is-focused)
  5x -1:26.1.0 core:move-down (atom-text-editor.editor.is-focused)
  2x -1:23.9.0 editor:indent-selected-rows (atom-text-editor.editor.is-focused)
     -1:20.4.0 core:move-up (atom-text-editor.editor.is-focused)
  3x -1:19.4.0 core:select-up (atom-text-editor.editor.is-focused)
     -1:18.2.0 core:select-left (atom-text-editor.editor.is-focused)
     -1:17.5.0 editor:indent-selected-rows (atom-text-editor.editor.is-focused)
     -1:13.4.0 core:save (atom-text-editor.editor.is-focused)
     -0:57 editor:newline (atom-text-editor.editor.is-focused)
     -0:54.1.0 core:save (atom-text-editor.editor.is-focused)
  2x -0:25.5.0 terminal-plus:toggle (atom-text-editor.editor.is-focused)
     -0:04.9.0 command-palette:toggle (textarea.)
     -0:03.2.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:01.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:01.4.0 atom-sync:upload-directory (textarea.)

Config

{
  "core": {
    "customFileTypes": {
      "source.cpp": [
        "h"
      ]
    },
    "disabledPackages": [
      "compare-files",
      "autocomplete-css",
      "autocomplete-html",
      "language-clojure",
      "language-csharp",
      "language-go",
      "language-html",
      "language-java",
      "language-javascript",
      "language-mustache",
      "language-objective-c",
      "language-perl",
      "language-php",
      "language-python",
      "language-ruby",
      "language-ruby-on-rails",
      "language-sass",
      "language-sql",
      "language-toml",
      "language-xml",
      "language-yaml",
      "metrics",
      "remote-sync"
    ],
    "projectHome": "/Users/cento/Desktop/Devel",
    "themes": [
      "atom-dark-ui",
      "solarized-dark-syntax"
    ]
  }
}

Installed Packages

# User
atom-sync, v0.6.0
autocomplete-clang, v0.8.9
build, v0.54.1
clipboard-history, v0.6.6
file-icons, v1.6.14
file-watcher, v0.4.0
highlight-line, v0.11.1
minimap, v4.19.0
minimap-autohide, v0.10.1
open-recent, v5.0.0
remote-atom, v1.3.9
symbols-tree-view, v0.11.0
sync-settings, v0.6.0
term3, v0.21.0
terminal-plus, v0.14.5
time-status, v1.1.2

# Dev
No dev packages

Possible to add some settings to the console panel

Hi,

I love this plugin, but it is quite strange that this plugin does not provide any settings. Right now, the console panel is showing up a lot of info which can be quite annoying.

I wish we can have some configurations to show up only error info or be able to change the size of the console panel.

Thanks

Failed to load the atom-sync package

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.209.0
System: Ubuntu 14.04.2
Thrown From: atom-sync package, v0.4.4

Stack Trace

Failed to load the atom-sync package

At Cannot find module 'CSON'

Error: Cannot find module 'CSON'
  at Module._resolveFilename (module.js:328:15)
  at Function.Module._resolveFilename (/usr/share/atom/resources/app.asar/src/module-cache.js:383:52)
  at Function.Module._load (module.js:270:25)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/home/joan/.atom/packages/atom-sync/lib/helper/config-helper.coffee:2:8)
  at Object.<anonymous> (/home/joan/.atom/packages/atom-sync/lib/helper/config-helper.coffee:1:1)
  at Module._compile (module.js:452:26)
  at Object.requireCoffeeScript (/usr/share/atom/resources/app.asar/node_modules/coffee-cash/lib/coffee-cash.js:85:19)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/home/joan/.atom/packages/atom-sync/lib/controller/service-controller.coffee:6:16)
  at Object.<anonymous> (/home/joan/.atom/packages/atom-sync/lib/controller/service-controller.coffee:1:1)
  at Module._compile (module.js:452:26)
  at Object.requireCoffeeScript (/usr/share/atom/resources/app.asar/node_modules/coffee-cash/lib/coffee-cash.js:85:19)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/home/joan/.atom/packages/atom-sync/lib/atom-sync.coffee:3:14)
  at Object.<anonymous> (/home/joan/.atom/packages/atom-sync/lib/atom-sync.coffee:1:1)
  at Module._compile (module.js:452:26)
  at Object.requireCoffeeScript (/usr/share/atom/resources/app.asar/node_modules/coffee-cash/lib/coffee-cash.js:85:19)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Package.module.exports.Package.requireMainModule (/usr/share/atom/resources/app.asar/src/package.js:709:34)
  at /usr/share/atom/resources/app.asar/src/package.js:188:28
  at Package.module.exports.Package.measure (/usr/share/atom/resources/app.asar/src/package.js:165:15)
  at Package.module.exports.Package.load (/usr/share/atom/resources/app.asar/src/package.js:179:12)
  at PackageManager.module.exports.PackageManager.loadPackage (/usr/share/atom/resources/app.asar/src/package-manager.js:372:14)
  at PackageManager.module.exports.PackageManager.activatePackage (/usr/share/atom/resources/app.asar/src/package-manager.js:451:30)
  at /usr/share/atom/resources/app.asar/node_modules/settings-view/lib/package-manager.js:362:29
  at exit (/usr/share/atom/resources/app.asar/node_modules/settings-view/lib/package-manager.js:53:16)
  at triggerExitCallback (/usr/share/atom/resources/app.asar/src/buffered-process.js:213:47)
  at /usr/share/atom/resources/app.asar/src/buffered-process.js:220:18
  at Socket.<anonymous> (/usr/share/atom/resources/app.asar/src/buffered-process.js:98:18)
  at emitOne (events.js:82:20)
  at Socket.emit (events.js:166:7)
  at Pipe.close (net.js:464:12)

Commands

     -3:25.9.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -3:24.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "one-dark-syntax"
    ],
    "disabledPackages": [
      "hide-files"
    ],
    "ignoredNames": [
      "*.pyc"
    ],
    "projectHome": "/home/joan/Projects"
  }
}

Installed Packages

# User
atom-sync, v0.4.4
color-picker, v2.0.4
django-templates, v0.5.0

# Dev
No dev packages

Might to be update rsync 0.4.0 to 0.6.1? to support Windows

Hi!

I modified rsync.js at node-rsync (mattijs/node-rsync#53) to handle directory separator under Windows.
I created a new function: escapeDirectorySeparator() which is used in escapeFileArg() to set directory separator correctly under Windows.
When my pull request is accepted and merged at node-rsync, maybe at the package.json need to update the "rsync" dependency to the latest version (maybe it will be 0.6.1 or greater).

How can you use it under Windows?
Firstly install "OpenSSH for Windows" (I found one here: http://www.mls-software.com/opensshd.html).
After than install cygwin and rsync (only the rsync.exe will be needed).
Copy rsync.exe under "c:\Program Files\OpenSSH\bin" or where you install OpenSSH.
Now you can check your installation, just open command line (Ctrl+R - cmd), and run "ssh" and "rsync" command to check if both of them available.

To use rsync correctly under Windows, you need to symlink your working directories well (with standard Windows mklink command line tool).
For example:
mklink /J "C:\Users" "C:\home"
mklink /J "C:\Users\your_username\develop" "D:\your_develop_folder\root"

In this case your develop directories can be available under
"c:\Program Files\OpenSSH\home\your_username\develop" and "c:\home\your_username\develop"

In the Atom you can import your develop directory from "c:\home\your_username\develop..." and you can use atom-sync package with rsync correctly.

Regards,
William

atom-sync doesn't work for subfolder

Hello there,
I am new in Atom. I've installed atom-sync and configured it following the instructions.
I put the .sync-config.cson in the root folder of my project and everything works smoothly for the files in the same folder.

But when I open or save files in subfolders of the projects the plugin doesn't fire.

Can someone please help me figuring out why?
I couldn't find anything online.

Thank you!
A.

.sync-config.cson in wrong directory

Steps to reproduce:

  1. have directory with sync config called "something"
  2. add new project folder called "somethingNew"
  3. edit sync config for somethingNew directory

Expected behavior:
somethingNew has new config file which works for that directory

Actual behavior:
somethingNew reads config file from directory "something"

Please fix this, it's really annoying, and not to even mention what could go wrong on actual sync of wrong directories

Uncaught TypeError: atom.workspace.getLeftPanels(...)[0].getItem(...).selectedPaths is not a func...

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.19
System: Mac OS X 10.11.1
Thrown From: atom-sync package, v0.5.2

Stack Trace

Uncaught TypeError: atom.workspace.getLeftPanels(...)[0].getItem(...).selectedPaths is not a function

At /Users/luis/.atom/packages/atom-sync/lib/atom-sync.coffee:18

TypeError: atom.workspace.getLeftPanels(...)[0].getItem(...).selectedPaths is not a function
    at atom-workspace.subscriptions.add.atom.commands.add.atom-sync:upload-directory (/Users/luis/.atom/packages/atom-sync/lib/atom-sync.coffee:18:76)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:245:29)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:145:19)
    at [object Object].jQuery.fn.trigger (/Applications/Atom.app/Contents/Resources/app.asar/src/space-pen-extensions.js:64:23)
    at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:75:67)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)
    at EventEmitter.ipc.sendSync (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/ipc.js:21:31)
    at BrowserWindow.RemoteMemberFunction [as emit] (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:140:29)

Commands

     -3:00.3.0 application:new-file (atom-pane.pane.active)
     -2:59.5.0 application:open-file (atom-text-editor.editor)
     -0:24 core:paste (atom-text-editor.editor.is-focused)
     -0:22.8.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-material-ui",
      "atom-material-syntax"
    ],
    "disabledPackages": [
      "line-count-status"
    ]
  }
}

Installed Packages

# User
atom-material-syntax, v0.2.4
atom-material-ui, v0.6.2
atom-sync, v0.5.2
tool-bar, v0.1.9
tool-bar-main, v0.0.8

# Dev
No dev packages

Local files never overwritten with remote copy

I'm finding that my local files that already exist are never overwritten by the remote version of the file. I've tried various options to copy on save and upon open, all to no avail. It syncs fine when the files are new.

Here's how it played out for me when I needed to make a change:

  1. I sync'd Remote -> Local before coding to make sure I had any changes done by other devs on the server.
  2. I did my changes locally
  3. I sync'd from Local -> Remote and deployed to production from there.

I almost broke produciton in doing this! What I didn't realize was that my local copy had NOT been overwritten with changes from the remote server. Therefore, the copy that I pushed back to the server was very old. It's extremely lucky that I discovered this quickly while looking for my changes in production.

Please fix or tell me what I'm doing wrong. I'm trying to keep code synchronized between 2 separate repos and I'm finding this plugin could be extrememly useful. That being said, I'm too scared to use it as of now.

Thank you!

Uncaught Error: You must create remote config first

Actually it's not really a bug but a warning, I'll move it to notification in the future

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.208.0
System: Mac OS X 10.10.3
Thrown From: atom-sync package, v0.4.2

Stack Trace

Uncaught Error: You must create remote config first

At /Users/dingjie/github/atom-sync/lib/helper/config-helper.coffee:25

Error: You must create remote config first
  at Object.module.exports.ConfigHelper.assert (/Users/dingjie/github/atom-sync/lib/helper/config-helper.coffee:25:23)
  at Object.module.exports.ServiceController.downloadDirectory (/Users/dingjie/github/atom-sync/lib/controller/service-controller.coffee:76:26)
  at atom-workspace.subscriptions.add.atom.commands.add.atom-sync:download-directory (/Users/dingjie/github/atom-sync/lib/atom-sync.coffee:15:25)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
  at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:153:19)
  at [object Object].jQuery.fn.trigger (/Applications/Atom.app/Contents/Resources/app.asar/src/space-pen-extensions.js:64:23)
  at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:75:67)
  at emitTwo (events.js:87:13)
  at EventEmitter.emit (events.js:169:7)
  at EventEmitter.ipc.sendSync (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/ipc.js:21:31)
  at BrowserWindow.RemoteMemberFunction [as emit] (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:110:29)
  at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/context-menu-manager.js:170:31)
  at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:148:33)
  at HTMLDocument.handler (/Applications/Atom.app/Contents/Resources/app.asar/src/space-pen-extensions.js:112:34)
  at HTMLDocument.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/space-pen/vendor/jquery.js:4681:9)
  at HTMLDocument.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/space-pen/vendor/jquery.js:4359:46)

Commands

  2x -0:04.6.0 core:close (ol.tree-view.list-tree.has-collapsable-children.focusable-panel.multi-select)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "chester-atom-syntax"
    ],
    "disabledPackages": []
  }
}

Installed Packages

# User
atom-sync, v0.4.2
atom-ternjs, v0.6.4
autocomplete-php, v0.3.6
chester-atom-syntax, v0.1.1
color-picker, v2.0.4
emmet, v2.3.10
file-icons, v1.5.7
fonts, v0.4.2
linter, v0.12.7
linter-csslint, v0.0.13
linter-htmlhint, v0.0.16
linter-jshint, v0.1.6
linter-less, v0.5.0
linter-php, v0.0.15
minimap, v4.9.4
minimap-find-and-replace, v4.2.0
travis-ci-status, v0.15.0

# Dev
No dev packages

wrong directory

Syncing from [email protected]:\media\sdn1\home\diglett\www\website/
 to C:\Users\Diglett\Desktop\website...
Syntax or usage error, plese review your config file.

Why am I not able to use forward slashes instead of backslashes?

  host: "127.0.0.1"
  user: "diglett"
  path: "/media/sdn1/home/diglett/www/website"

Multi-user config

Being able to set user and host but keep the rest of the settings checked in with the project would be very useful for me an my team.

One very flexible way of solving this could be to be able to specify the config in a JS-file (i.e. allow .sync-config.js as well as .sync-config.cson).

Setting defaults for host and user in settings for the atom package would also work, but using JS opens up room for customizing triggers and all kinds of cool and nutty ideas :)

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.