NodeJS tools like npm, gulp, or grunt often don't save their parameters in a way that tmux-resurrect can easily capture. A recommended workaround is to use yarn instead of npm or gulp directly, as it provides more consistent process visibility.
Configuration Examples
Using Yarn for watch commands:
set -g @resurrect-processes '"~yarn watch"'
set -g @resurrect-processes '"~yarn watch->yarn watch"'
Using Yarn for Gulp:
set -g @resurrect-processes '"~yarn gulp test"'
Using NVM with Gulp:
set -g @resurrect-processes '"~yarn gulp test->nvm use && gulp test"'
Handling Dash-separated commands
If you have commands that differ only by a dash (e.g., gulp test and gulp test-it), tmux-resurrect might incorrectly truncate the second command. To fix this, wrap the argument in quotes in your config and ensure the ~/.tmux/resurrect/last file also contains quotes for that argument:
set -g @resurrect-processes '"~yarn gulp "test-it"->gulp test-it"'