Responsive remote development means keeping a local folder in sync with a remote folder.
-
cp ./sync-config-example.sh path/to/your/project/folder/my-sync-config.sh
-
Edit
my-sync-config.sh
accordingly. See./sync-with-sgw.sh --help
for options. -
Send your project folder to your remote system and watch for changes by:
./sync-with-sgw.sh -c path/to/your/project/folder/my-sync-config.sh --dry-run
This will keep path/to/your/project/folder/
and $dest_dir
(within your config file) in sync. Remove the --dry-run
switch for real transfer if the transfer summary is as you expected.
Synchronization will exclude the .git
folder and the other files/folders listed in path/to/your/project/folder/.gitignore
.
run_before_sync
hooks can be used to build, bundle, copy files or perfom any other tasks before the actual synchronization. Synchronization will fail and display a visual error message if any of the hooks fails.