pucelle / vscode-run-on-save

Run configured shell commands when a file is saved in vscode, and output configured messages on status bar.
https://marketplace.visualstudio.com/items?itemName=pucelle.run-on-save
MIT License
51 stars 14 forks source link

[WIP] Start extension to enable per command configuration #10

Closed BitFis closed 4 years ago

BitFis commented 4 years ago

Enable feature to define if command is run before or after save is executed as defined by #7.

@pucelle There are multiple options on how to implement it:

  1. Global option
  2. Per command base (add option to run runBeforeSave: true with default)
  3. Add new commands array "runOnSave.beforeSaveCommands"

I would have gone for option 2 or 3, since it enables more flexibility, what do you think?

pucelle commented 4 years ago

I can see that this codes of this request is not completed, So it will not be merged.

kairat1115 commented 4 years ago

Hi ! Found a piece of code that probably will help. https://github.com/OneOfOne/vscode-save-runner/blob/master/src/save-runner.ts#L59 Would love to see that feature too.

pucelle commented 4 years ago

Thanks, kairat1115, I will handle it later.

pucelle commented 4 years ago

Already supported with a new property commandBeforeSaving, this property should be not professional enough compare to pre or post, but should be easy to understand. Thanks for your works and suggestions.