Skip to content

Commit

Permalink
Merge pull request #41 from cloudbow/master
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
bmingles authored Sep 27, 2024
2 parents dae1b66 + 6965764 commit 6e60293
Showing 1 changed file with 28 additions and 22 deletions.
50 changes: 28 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,34 @@ Add "emeraldwalk.runonsave" configuration to user or workspace settings.
This sample configuration will run echo statements including the saved file path.
In this sample, the first command is async, so the second command will get executed immediately even if first hasn't completed.
Since the second isn't async, the third command won't execute until the second is complete.
```
{
"emeraldwalk.runonsave": {
"commands": [
{
"match": ".*",
"isAsync": true,
"cmd": "echo 'I run for all files.'"
},
{
"match": "\\.txt$",
"cmd": "echo 'I am a .txt file ${file}.'"
},
{
"match": "\\.js$",
"cmd": "echo 'I am a .js file ${file}.'"
},
{
"match": ".*",
"cmd": "echo 'I am ${env.USERNAME}.'"
}
]
}
}
```

"emeraldwalk.runonsave": {
"commands": [
{
"match": ".*",
"isAsync": true,
"cmd": "echo 'I run for all files.'"
},
{
"match": "\\.txt$",
"cmd": "echo 'I am a .txt file ${file}.'"
},
{
"match": "\\.js$",
"cmd": "echo 'I am a .js file ${file}.'"
},
{
"match": ".*",
"cmd": "echo 'I am ${env.USERNAME}.'"
}
]
}
## Output of the commands
Please see the output in Output window and then switch the right side drop down to "Run On Save" to see the ouput of the commands stdout

## Commands
The following commands are exposed in the command palette:
Expand Down Expand Up @@ -72,4 +78,4 @@ Commands support placeholders similar to tasks.json.
* [Source Code](https://github.com/emeraldwalk/vscode-runonsave)

## License
[Apache](https://github.com/emeraldwalk/vscode-runonsave/blob/master/LICENSE)
[Apache](https://github.com/emeraldwalk/vscode-runonsave/blob/master/LICENSE)

0 comments on commit 6e60293

Please sign in to comment.