vscode / sublime text make post request on save

95 views Asked by At

For the purpose of rapid development I would like to REST POST (or websocket) changes to my server every time I save a css file. Is there an existing extension that can help me?

2

There are 2 answers

0
Harry On BEST ANSWER

There really is none. I used RunOnSave as mentioned previously and Gist as inspiration to make my own extension.

3
jschnasse On

You could use RunOnSave and call curl to make the HTTP POST request.

"emeraldwalk.runonsave": {
"commands": [
    {
        "match": "\\.css$",
        "cmd": "curl -XPOST localhost:8080/hello"
    }
]

}