Currently, the scripts are defined for all OS types. Meaning if you create a bash script, and you would use it for Windows and macOS, it might fail.
A better solution would be the ability to specify scripts per OS type so that you can define a PowerShell script for Windows and a bash script for macOS.
The current script configuration
{
"$schema": "https://frontmatter.codes/config/custom.scripts.schema.json",
"title": "Create image folder",
"id": "create-image-folder",
"script": "./.frontmatter/config/custom/scripts/create-image-folder.sh",
"command": "bash"
}
Proposed change:
{
"$schema": "https://frontmatter.codes/config/custom.scripts.schema.json",
"title": "Create image folder",
"id": "create-image-folder",
"script": "./.frontmatter/config/custom/scripts/create-image-folder.sh",
"command": "bash",
"environments": [
{
"type": "windows"
"script": "./.frontmatter/config/custom/scripts/create-image-folder.ps1",
"command": "powershell"
}
]
}
By adding the environments property with options for windows, macos, and linux, it would allow you to override the default script for a specific environment.
Currently, the scripts are defined for all OS types. Meaning if you create a bash script, and you would use it for Windows and macOS, it might fail.
A better solution would be the ability to specify scripts per OS type so that you can define a PowerShell script for Windows and a bash script for macOS.
The current script configuration
{ "$schema": "https://frontmatter.codes/config/custom.scripts.schema.json", "title": "Create image folder", "id": "create-image-folder", "script": "./.frontmatter/config/custom/scripts/create-image-folder.sh", "command": "bash" }Proposed change:
{ "$schema": "https://frontmatter.codes/config/custom.scripts.schema.json", "title": "Create image folder", "id": "create-image-folder", "script": "./.frontmatter/config/custom/scripts/create-image-folder.sh", "command": "bash", "environments": [ { "type": "windows" "script": "./.frontmatter/config/custom/scripts/create-image-folder.ps1", "command": "powershell" } ] }By adding the
environmentsproperty with options forwindows,macos, andlinux, it would allow you to override the default script for a specific environment.