Simple FTP Deploy
This package for Sublime Text 3/4 give you possibility to auto upload file to FTP server when you save local file.
Details
Installs
- Total 51K
- Win 34K
- Mac 11K
- Linux 6K
Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 2 | 2 | 2 | 2 | 2 | 0 | 0 | 0 | 0 | 0 | 4 | 4 | 3 | 1 | 1 | 1 | 3 | 5 | 3 | 0 | 0 | 6 | 5 | 1 | 1 | 3 | 0 | 1 | 4 | 2 | 1 | 1 | 5 | 5 | 2 | 1 | 0 | 0 | 1 | 2 | 6 | 5 | 1 | 5 | 2 | 6 |
Mac | 1 | 1 | 2 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 3 | 0 | 0 | 2 | 1 | 1 | 1 | 3 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 0 | 3 | 1 | 0 | 1 |
Linux | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 | 1 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 1 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Simple FTP Deploy
This package for Sublime Text ¾ gives you possibility to automatically upload or delete files from FTP server when you save or delete local files and also execute custom triggers.
Features
- Upload or delete files from FTP server when you locally save or delete files
- TLS support
- Highly configurable
- Automatically create directory if it doesn't exists on the server
- Trigger custom actions, such as run JS or CSS minification scripts, upon saving or deleting files
How to Install
Using Package Control
- In Sublime Text open menu
Tools -> Command Palette...
- Enter
Package Control: Install Package
- Find and install
Simple FTP Deploy
Manual
- Download the .zip
- Open
Packages
directory, which you can find using the Sublime Text menu itemPreferences -> Browse Packages...
- Unzip the archive to this directory.
How to Use
- Open folder which contains your local files in Sublime Text - open menu
File -> Open Folder...
orProject -> Add Folder to Project...
. - Create new
simple-ftp-deploy.json
config file in the root of an opened directory (its settings see to configuration section) - Save the config file.
- Now open file which you want to edit, it must be located in an opened directory or in the inside folders, if you save it, this file will be upload to FTP server which you entered in the config file.
Configuration
Minimal simple-ftp-deploy.json
file:
{
"host": "localhost",
"username": "user",
"password": "pass"
}
Note: Password is optional. If omitted, you will be asked for it once needed.
Format
The format is JSON, so every property consists of a key-value pair:
{
"host": "localhost",
"port": 21,
"username": "user",
"password": "pass",
"rootDirectory": "/path/",
"ignoredFilenames": ["example.py", "anotherFilename.json"],
"ignoredExtensions": [".ignore", ".txt"],
"ignoredFolders": ["ignore", "IGNORE"],
"reuseSessions": true,
"connectionTimeout": 600,
"passive": true,
"useTLS": true,
"disabledEvents": ["deleteFile"],
"noPromptEvents": ["createFolder"],
"triggers": [
{
"on": "save",
"extensions": [".css", ".js"],
"execute": ".simple-ftp-deploy/minifier.py"
}
]
}
Properties
"host"
string
The hostname or IP address of your FTP server.
"port"
number, optional (default: 21
)
The port of the FTP server.
"username"
string
The username.
"password"
string, optional
The password. If not given, you will be asked for it once needed.
"rootDirectory"
string, optional (default: "/"
)
The FTP path to deploy.
Example: in the root of FTP you have three folders site1
, site2
, site3
and if you need to upload in site2
folder, you must set this property to /site2
, because if you skip this property, files will be upload to the root of FTP.
"ignoredFilenames"
array of strings, optional (default: []
)
List of filenames, that are ignored and not uploaded. Note that "simple-ftp-deploy.json"
is ALWAYS ignored. Case-sensitive
"ignoredExtensions"
array of strings, optional (default: []
)
List of extensions to ignore. Note that it only check last extension (so file.tar.gz
has extension ".gz"
) and if you want to ignore files like .htaccess
, this file has no extension => use "ignoredFilenames"
instead. Case-sensitive
"ignoredFolders"
array of strings, optional (default: []
)
List of folder names to ignore. The file is ignored, if it is in at least one of the specified folders (so folder1/folder2/file.py
is ignored if "ignoredFolders"
contains "folder1"
and/or "folder2"
). Case-sensitive
"reuseSessions"
boolean, optional (default: true
)
Whatever FTP session will be reused for next action (keeps session open for "connectionTimeout"
; previously named "sessionCacheEnabled"
).
"connectionTimeout"
number, optional (default: 600
)
Sets timeout for FTP connections (in seconds).
"passive"
boolean, optional (default: true
)
Whether to connect to the FTP server in passive mode.
"useTLS"
boolean, optional (default: false
)
Whether to connect to the FTP server with TLS connection (May not work correctly in Sublime Text 3).
"disabledEvents"
array of strings, optional (default: []
)
List of events that will be disabled (for example if you do not want to click Cancel
every time you are asked if you want to delete file(s) from FTP server too)
Available events are: "deleteFile"
"noPromptEvents"
array of strings, optional (default: []
)
List of events that won't prompt you (for example if you do not want to click Delete
every time you are asked if you want to delete file(s) from FTP server too)
Available events are: "deleteFile"
, "createFolder"
"triggers"
array of triggers (objects), optional (default: []
)
List of custom triggers to run specific scripts when a certain event occurs. For instance, you can execute scripts to minify JS or CSS files upon the occurrence of certain events. To view an example of trigger usage with css-html-js-minify script, please refer to this link.
Each trigger can contain:
"on"
string - When to call trigger (available values:"save"
or"delete"
)."extensions"
array of string, optional - For which file extensions call this trigger. See"ignoredExtension"
for more info."filenames"
array of string, options - For which filenames call this trigger. See"ignoredFilenames"
for more info."execute"
string - Path (relative from project root) to python file to execute
Contributors
License
The MIT License