All Projects → emacs-php → emacs-auto-deployment

emacs-php / emacs-auto-deployment

Licence: other
Copy file on save, automatic deployment it. aka auto-deployment.

Programming Languages

emacs lisp
2029 projects

Projects that are alternatives of or similar to emacs-auto-deployment

ploi-deploy-action
Deploy your application to Ploi with Github actions
Stars: ✭ 25 (+38.89%)
Mutual labels:  deploy
emacs-mips-mode
An Emacs major mode for MIPS assembly code
Stars: ✭ 22 (+22.22%)
Mutual labels:  melpa
jekyll-deploy-action
🪂 A Github Action to deploy the Jekyll site conveniently for GitHub Pages.
Stars: ✭ 162 (+800%)
Mutual labels:  deploy
slime-company
Company-mode completion backend for Slime.
Stars: ✭ 66 (+266.67%)
Mutual labels:  melpa
shakespeare-mode
An emacs major mode for editing hamlet, lucius, and julius files
Stars: ✭ 35 (+94.44%)
Mutual labels:  melpa
company-ansible
Ansible keywords completion for Emacs
Stars: ✭ 21 (+16.67%)
Mutual labels:  melpa
helm-gitignore
Helm interface for generating .gitignore files
Stars: ✭ 20 (+11.11%)
Mutual labels:  melpa
milvus-helm
The helm chart to deploy Milvus
Stars: ✭ 37 (+105.56%)
Mutual labels:  deploy
EmbeddedTools
Additions to the model-based DSL for deploying Java and Native projects to remote targets
Stars: ✭ 14 (-22.22%)
Mutual labels:  deploy
ai-deployment
关注AI模型上线、模型部署
Stars: ✭ 149 (+727.78%)
Mutual labels:  deploy
flycheck-dmd-dub
flycheck and DCD dub support to enable D IDE features in Emacs
Stars: ✭ 14 (-22.22%)
Mutual labels:  melpa
ngx-deploy-docker
Deploy your Angular Application to a Docker registry directly from the Angular CLI! 🚀
Stars: ✭ 14 (-22.22%)
Mutual labels:  deploy
mailad
Software to provision a mail server with users from a Windows or Samba 4 Active Directory
Stars: ✭ 21 (+16.67%)
Mutual labels:  deploy
auctex-latexmk
This library adds LatexMk support to AUCTeX.
Stars: ✭ 81 (+350%)
Mutual labels:  melpa
alarm-clock
An alarm clock for Emacs
Stars: ✭ 15 (-16.67%)
Mutual labels:  melpa
now-docs
[WIP] Deploy docs with a single command using Now
Stars: ✭ 45 (+150%)
Mutual labels:  deploy
aliyun-oss-deploy
🙈 一个 nodejs 命令行工具,用于部署静态资源到 aliyun oss,支持代码方式和 CLI 方式!
Stars: ✭ 31 (+72.22%)
Mutual labels:  deploy
repl.deploy
Automatically deploy from GitHub to Replit, lightning fast ⚡️
Stars: ✭ 63 (+250%)
Mutual labels:  deploy
emacs-pug-mode
Pug support for Emacs, based on slim-mode.
Stars: ✭ 39 (+116.67%)
Mutual labels:  melpa
web-mode-edit-element
Helper-functions for attribute- and element-handling
Stars: ✭ 18 (+0%)
Mutual labels:  melpa

Emacs auto-deployment

MELPA: copy-file-on-save MELPA stable: copy-file-on-save

copy-file-on-save is a minor mode to copy the file to another path on after-save-hook. This not only saves the backup in the project specific path, it also you can realize the deployment to the remote server over TRAMP.

Why copy-file-on-save?

The original name of this feature was auto-deployment. It was named after JetBrains’ automatic deployment function. But in Emacs this function can be realized by TRAMP’s excellent file system abstraction layer. That is, deploying to remote server is just done with only copy-file function.

vs direct editing on TRAMP

TRAMP can log in to remote server from Emacs and edit the file directly. This means that you do not need to keep a full copy of the project on your client PC. But at the price you will feel latency to all file system operations.

The disadvantage of TRAMP is Emacs Lisp compatibility. Especially in the case of several packages, processing depending on the file system is lacking consideration or it may be slow even if it works. For example, Magit also works via TRAMP, but it’s very slow.

vs emacs-ssh-deploy

ssh-deploy package is a TRAMP wrapper like copy-file-on-save, but it has many features such as directory recursive deployment and diff between remote and local. If you want rich features you should use ssh-deploy.

On the other hand, we only provide simple functions. We recommend using tools and scripts such as rsync and git for multi-file deployment.

For deployment

A typical use of this feature is to place PHP files on the remote development server. However, this is useful not only for PHP but also for synchronizing files without depend on shared directory function of virtual environments (VirtualBox, Vagrant and Docker).

Extends TRAMP

vagrant-tramp and docker-tramp increase the affinity of Emacs (TRAMP) and Vagrant/Docker, so it is worth noting.

API

Variable

(string) copy-file-on-save-dest-dir

Path to deployment directory or convert (mapping) function.

You can use TRAMP’s syntax. See Configuration - TRAMP User Manual and Inline methods. (ex. /scp:dest-server:/home/your/path/to/proj)

(repeat string) copy-file-on-save-ignore-patterns

Configure for each project

This is necessary for sharing variables in the project.

Using .dir-locals.el (RECOMMENDED)

Put the following into your .dir-locals.el in project root directory.

((nil . ((copy-file-on-save-dest-dir . "/scp:dest-server:/home/your/path/to/proj")
         (copy-file-on-save-ignore-patterns . ("/cache")))))

This method uses standard functions of Emacs. However, you will feel annoying warnings from Emacs. Please see Safe File Variables - GNU Emacs Manual for how to suppress this warning.

How to turn on copy-file-on-save

Enable global-minor-mode (RECOMMENDED)

Put the following into your init.el or .emacs file.

(global-copy-file-on-save-mode)

Please don’t worry. This mode does not work in buffers that do not have available settings for deployment.

Enable manually

M-x copy-file-on-save-mode will toggle enable/disable the minor mode.

Using hook with auto-minor-mode

;; Example for full directory path to your project.
(add-to-list 'auto-minor-mode-alist `(,(format "^%s/work/your-project/" (getenv "HOME")) . copy-file-on-save-mode))
;; You can ommit path if it is enough specific your project.
(add-to-list 'auto-minor-mode-alist '("/work/your-project/" . copy-file-on-save-mode))

Changelog

See also CONTRIBUTORS.

v0.0.3

  • [ENHANCEMENT,BUG] Fixed saving failed when there was no directory. (Thanks @Csomnia)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].