Skip to content

Commit

Permalink
Merge pull request #25 from xAlien95/master
Browse files Browse the repository at this point in the history
Updated addToVariable, getVariable and setVariable documentation
  • Loading branch information
joshfarrant committed Nov 30, 2018
2 parents 602dd11 + f8a28d8 commit 079aed0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Adding a new Shortcut action is relatively straightforward.
6. Connect up all Shortcut options to the function parameters. Try to be as thorough as possible and make sure you cover all possible options. You'll likely need to add some new types to `src/interfaces/WF` and `src/interfaces/WF/WFWorkflowActionParameters.ts`. You'll also want to check whether or not the action can be used as a 'Magic Variable'. If it can, don't forget to wrap the exported function with the `withActionOutput` function (see `src/actions/number.ts` as an example).
7. Export the new file from `src/actions/index.ts`.
8. Add tests for the new action to `__tests__/actions`. Again, try to be as thorough as possible and use another action's tests as a starting point.
9. Make sure all tests pass, and that the new action is documented with JSDoc in the same way all other actions are.
9. Make sure all tests pass, and that the new action is documented with TypeDoc in the same way all other actions are.
10. Build a test Shortcut (you can find info on how to do that locally [here](https://github.com/joshfarrant/shortcuts-js/issues/22#issuecomment-443121866)) and Airdrop it to your phone to make sure that the new action works as expected.
11. Open a Pull Request!

Expand Down
4 changes: 2 additions & 2 deletions src/actions/addToVariable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import WFWorkflowAction from '../interfaces/WF/WFWorkflowAction';
* Add to Variable Action. Appends this action's input to the specified variable, creating the variable if it does not exist.
*
* ```js
* // Append the input to the variable 'My Var'
* // Append the input to the variable named 'My Var'
* addToVariable({
* name: 'My Var',
* variable: variable('My Var'),
* });
* ```
*/
Expand Down
2 changes: 1 addition & 1 deletion src/actions/getVariable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import WFWorkflowAction from '../interfaces/WF/WFWorkflowAction';
*
* ```js
* getVariable({
* variable: 'My Variable',
* variable: variable('My Variable'),
* });
* ```
*/
Expand Down
4 changes: 2 additions & 2 deletions src/actions/setVariable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import WFWorkflowAction from '../interfaces/WF/WFWorkflowAction';
*
* ```js
* setVariable({
* name: 'My Variable',
* variable: variable('My Variable'),
* });
* ```
*/
const setVariable = (
options: {
/** The name of the variable to set */
/** The variable to set */
variable: Attachment,
},
): WFWorkflowAction => {
Expand Down

0 comments on commit 079aed0

Please sign in to comment.