Script runner for Visual Studio Code
Dislay a button to run a command for each function call expression with the function name matching functionNameRegex.
Command can be customized.
{
"fbc.scriptrunner.filePattern": {
"type": "string",
"default": "**/*.script.{js,ts,tsx,jsx}",
"description": "Glob pattern to match test files (e.g., **/*.script.{js,ts,tsx,jsx})"
},
"fbc.scriptrunner.functions": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "Command to execute. Supported variables: {filePath} {scriptName}",
"default": "npx tsx {filePath} {scriptName}"
},
"title": {
"type": "string",
"description": "Title to display",
"default": "Run script"
}
}
},
"default": {
"script": {
"command": "npx tsx {filePath} {scriptName}",
"title": "Run script"
}
}
}
}