You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Placeholder that unfolds into multiple tasks (#134)
* Placeholder that unfolds into multiple tasks
This adds a new placeholder, {%}, which unfolds into multiple tasks – one for each input argument. The unfolded tasks gets assigned {1}, {2} etc instead of {%}.
Purpose:
Be able to in parallell process a single npm task X times with a different argument each time.
Copy file name to clipboardExpand all lines: docs/npm-run-all.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -177,6 +177,12 @@ There are the following placeholders:
177
177
-`{1}`, `{2}`, ... -- An argument. `{1}` is the 1st argument. `{2}` is the 2nd.
178
178
-`{@}` -- All arguments.
179
179
-`{*}` -- All arguments as combined.
180
+
-`{%}` -- Repeats the command for every argument. (There's no equivalent shell parameter and does not support suffixes)
181
+
182
+
Support for following suffixes:
183
+
184
+
-`{1-=foo}` -- defaults to `'foo'` here when the 1st argument is missing
185
+
-`{1:=foo}` -- defaults to `'foo'` here and in all following `{1}` when the 1st argument is missing
180
186
181
187
Those are similar to [Shell Parameters](http://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameters). But please note arguments are enclosed by double quotes automatically (similar to npm).
Copy file name to clipboardExpand all lines: docs/run-p.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -141,6 +141,12 @@ There are the following placeholders:
141
141
-`{1}`, `{2}`, ... -- An argument. `{1}` is the 1st argument. `{2}` is the 2nd.
142
142
-`{@}` -- All arguments.
143
143
-`{*}` -- All arguments as combined.
144
+
-`{%}` -- Repeats the command for every argument. (There's no equivalent shell parameter and does not support suffixes)
145
+
146
+
Support for following suffixes:
147
+
148
+
-`{1-=foo}` -- defaults to `'foo'` here when the 1st argument is missing
149
+
-`{1:=foo}` -- defaults to `'foo'` here and in all following `{1}` when the 1st argument is missing
144
150
145
151
Those are similar to [Shell Parameters](http://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameters). But please note arguments are enclosed by double quotes automatically (similar to npm).
Copy file name to clipboardExpand all lines: docs/run-s.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -132,6 +132,12 @@ There are the following placeholders:
132
132
-`{1}`, `{2}`, ... -- An argument. `{1}` is the 1st argument. `{2}` is the 2nd.
133
133
-`{@}` -- All arguments.
134
134
-`{*}` -- All arguments as combined.
135
+
-`{%}` -- Repeats the command for every argument. (There's no equivalent shell parameter and does not support suffixes)
136
+
137
+
Support for following suffixes:
138
+
139
+
-`{1-=foo}` -- defaults to `'foo'` here when the 1st argument is missing
140
+
-`{1:=foo}` -- defaults to `'foo'` here and in all following `{1}` when the 1st argument is missing
135
141
136
142
Those are similar to [Shell Parameters](http://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameters). But please note arguments are enclosed by double quotes automatically (similar to npm).
0 commit comments