{"id":21121489,"url":"https://github.com/oneofone/vscode-save-runner","last_synced_at":"2026-04-28T09:05:41.790Z","repository":{"id":141895867,"uuid":"131557237","full_name":"OneOfOne/vscode-save-runner","owner":"OneOfOne","description":"Save Runner for Visual Studio Code","archived":false,"fork":false,"pushed_at":"2019-05-08T18:55:32.000Z","size":108,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-01T05:47:22.894Z","etag":null,"topics":["typescript","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=oneofone.save-runner","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OneOfOne.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-30T04:55:49.000Z","updated_at":"2024-04-24T19:44:03.000Z","dependencies_parsed_at":"2023-03-13T10:27:54.297Z","dependency_job_id":null,"html_url":"https://github.com/OneOfOne/vscode-save-runner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OneOfOne/vscode-save-runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneOfOne%2Fvscode-save-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneOfOne%2Fvscode-save-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneOfOne%2Fvscode-save-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneOfOne%2Fvscode-save-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OneOfOne","download_url":"https://codeload.github.com/OneOfOne/vscode-save-runner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneOfOne%2Fvscode-save-runner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32373549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["typescript","vscode","vscode-extension"],"created_at":"2024-11-20T03:50:49.471Z","updated_at":"2026-04-28T09:05:41.758Z","avatar_url":"https://github.com/OneOfOne.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Save Runner for Visual Studio Code\n\nThis extension allows configuring commands that get run whenever a file is about to be saved or after it gets saved to disk.\n\nThis extension is heavily inspired by [emeraldwalk.runonsave](https://marketplace.visualstudio.com/items?itemName=emeraldwalk.RunOnSave) and\neslint extension's lack of proper fixing on save.\n\n## Features\n\n* Preprocess the document and save the processed results.\n* Pipe the document to multiple preprocessors.\n* Use a temp file for before-save commands that doesn't support pipes.\n* Regex pattern matching for files that trigger commands running.\n* Sync and async support for after save commands.\n\n## Configuration\n\n```ts\ninterface Config extends vscode.WorkspaceConfiguration {\n\tenabled: boolean; // default false\n\n\t// show the output panel on updates\n\tshowOutput: boolean; // default false\n\n\t// execute pre/post commands under the specified shell.\n\tshell: string; // default ''\n\n\t// auto clear the output channel before running commands.\n\tautoClearOutput: boolean;\n\n\t// commands to run\n\tcommands: Command[];\n}\n\ninterface Command {\n\tenabled?: boolean; // default false\n\tinclude?: string; // regexp to match the file names\n\texclude?: string; // regexp to exclude file names\n\n\t// use a tempfile on pre-save, pass ${tmpFile} to the commands.\n\tuseTempFile?: boolean; // default true\n\n\t// run post-save commands async.\n\tisAsync?: boolean; // default false\n\n\t// commands to run before the document is saved, the documen will be replaced with the stdout of the command chain.\n\t// if useTempFile is false, the document will be piped to the commands.\n\tpre: string | string[];\n\n\t// commands to run after the file is successfully saved to disk.\n\tpost: string | string[];\n}\n```\n\n* **TODO:** make this section human readable. *\n\n## Example\n\nRun `eslint_d --fix` and update the document before saving.\n\n```json\n\t\"save-runner.enabled\": true,\n\t\"save-runner.commands\": [\n\t\t// write the current document to a tmp file, run eslint_d --fix on it,\n\t\t// and run diff on the modified tmp file and apply it to the document.\n\t\t{\n\t\t\t\"enabled\": false,\n\t\t\t\"include\": \"\\\\.[tj]sx?$\",\n\t\t\t\"exclude\": \"/node_modules/\",\n\t\t\t\"pre\": \"eslint_d --fix ${tmpFile}\",\n\t\t\t\"post\": \"echo saved ${relname}\"\n\t\t},\n\t\t// pipe the current document to goimports,\n\t\t// then runs a diff on the output of goimports and applies it to the document.\n\t\t{\n\t\t\t\"enabled\": true,\n\t\t\t\"include\": \"\\\\.go$\",\n\t\t\t\"useTempFile\": false,\n\t\t\t\"pre\": \"goimports\",\n\t\t\t\"post\": \"echo saved ${relname}\"\n\t\t}\n\t]\n```\n\n## Placeholders in commands\n\n* `${tmpFile}`: temp file path when `useTempFile` is set\n\n* `${workspaceRoot}`: workspace root folder\n\n* `${file}`: full path to the file\n* `${relname}`: path to the file without the workspace path.\n* `${ext}`: file extension\n\n* `${dirname}`: directory name of saved file\n* `${basename}`: saved file's basename\n* `${basenameNoExt}`: saved file's basename without extension\n\n* `${cwd}`: current working directory\n\n* `${env.**name**}` match environment variable by name\n\n## TODO\n\n* Detect commands that can return a diff (`goimports` for example`) and use that rather than using internal diff.\n\n## Links\n\n* [Marketplace](https://marketplace.visualstudio.com/items?itemName=oneofone.save-runner)\n* [Source Code](https://github.com/OneOfOne/vscode-save-runner)\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foneofone%2Fvscode-save-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foneofone%2Fvscode-save-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foneofone%2Fvscode-save-runner/lists"}