Skip to content

Commit da1a755

Browse files
committed
Whitespace cleanup
1 parent e4e21f3 commit da1a755

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/restoring_programs.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ Here's the general workflow for figuring this out:
104104
- Now that you know the full and the desired process string use tilde `~` and
105105
arrow `->` in `.tmux.conf` to make things work.
106106

107-
### Working with NodeJS <a name="nodejs"></a>
107+
### Working with NodeJS <a name="nodejs"></a>
108108
If you are working with NodeJS, you may get some troubles with configuring restoring programs.
109109

110110
Particularly, some programs like `gulp`, `grunt` or `npm` are not saved with parameters so tmux-resurrect cannot restore it. This is actually **not tmux-resurrect's issue** but more likely, those programs' issues. For example if you run `gulp watch` or `npm start` and then try to look at `ps` or `pgrep`, you will only see `gulp` or `npm`.
111111

112-
To deal with these issues, one solution is to use [yarn](https://yarnpkg.com/en/docs/install) which a package manager for NodeJS and an alternative for `npm`. It's nearly identical to `npm` and very easy to use. Therefore you don't have to do any migration, you can simply use it immediately. For example:
113-
- `npm test` is equivalent to `yarn test`,
112+
To deal with these issues, one solution is to use [yarn](https://yarnpkg.com/en/docs/install) which a package manager for NodeJS and an alternative for `npm`. It's nearly identical to `npm` and very easy to use. Therefore you don't have to do any migration, you can simply use it immediately. For example:
113+
- `npm test` is equivalent to `yarn test`,
114114
- `npm run watch:dev` is equivalent to `yarn watch:dev`
115115
- more interestingly, `gulp watch:dev` is equivalent to `yarn gulp watch:dev`
116116

@@ -124,11 +124,11 @@ It's fairly straight forward if you have been using `yarn` already.
124124

125125

126126
#### npm
127-
Instead of
127+
Instead of
128128

129129
set -g @resurrect-processes '"~npm run watch"' # will NOT work
130130

131-
we use
131+
we use
132132

133133
set -g @resurrect-processes '"~yarn watch"' # OK
134134

@@ -148,22 +148,22 @@ If you use `nvm` in your project, here is how you could config tmux-resurrect:
148148

149149
set -g @resurrect-processes '"~yarn gulp test->nvm use && gulp test"'
150150

151-
#### Another problem
151+
#### Another problem
152152
Let take a look at this example
153153

154154
set -g @resurrect-processes '\
155-
"~yarn gulp test->gulp test" \
155+
"~yarn gulp test->gulp test" \
156156
"~yarn gulp test-it->gulp test-it" \
157157
'
158-
**This will not work properly**, only `gulp test` is run, although you can see the command `node /path/to/yarn gulp test-it` is added correctly in `.tmux/resurrect/last` file.
158+
**This will not work properly**, only `gulp test` is run, although you can see the command `node /path/to/yarn gulp test-it` is added correctly in `.tmux/resurrect/last` file.
159159

160160
The reason is when restoring program, the **command part after the dash `-` is ignored** so instead of command `gulp test-it`, the command `gulp test` which will be run.
161161

162162
A work around, for this problem until it's fixed, is:
163163
- the config should be like this:
164164

165165
set -g @resurrect-processes '\
166-
"~yarn gulp test->gulp test" \
166+
"~yarn gulp test->gulp test" \
167167
"~yarn gulp \"test-it\"->gulp test-it" \
168168

169169
- and in `.tmux/resurrect/last`, we should add quote to `test-it` word

0 commit comments

Comments
 (0)