Skip to content

Commit

Permalink
Merge pull request #153 from Mrxx99/feature/primary-outputs
Browse files Browse the repository at this point in the history
Post action: opening main files in editor
  • Loading branch information
Takoooooo authored Jan 10, 2023
2 parents fada2e5 + 64d9229 commit f7312ca
Show file tree
Hide file tree
Showing 6 changed files with 173 additions and 5 deletions.
30 changes: 29 additions & 1 deletion templates/csharp/app-mvvm/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,34 @@
"AvaloniaStableChosen": {
"type": "computed",
"value": "(AvaloniaVersion == \"0.10.18\")"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
}
},
"primaryOutputs": [
{ "path": "AvaloniaAppTemplate.csproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "ViewModels/MainWindowViewModel.cs"
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Views/MainWindow.axaml"
}
],
"postActions": [
{
"id": "editor",
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens MainWindow and MainWindowViewModel in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1;2"
},
"continueOnError": true
}
}
]
}
28 changes: 28 additions & 0 deletions templates/csharp/app/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,34 @@
"AvaloniaStableChosen": {
"type": "computed",
"value": "(AvaloniaVersion == \"0.10.18\")"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
}
},
"primaryOutputs": [
{ "path": "AvaloniaAppTemplate.csproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "MainWindow.axaml.cs"
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "MainWindow.axaml"
}
],
"postActions": [
{
"id": "editor",
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens MainWindow in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1;2"
},
"continueOnError": true
}
]
}
30 changes: 29 additions & 1 deletion templates/csharp/xplat/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,34 @@
],
"replaces": "FrameworkParameter",
"defaultValue": "net7.0"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
}
}
},
"primaryOutputs": [
{ "path": "AvaloniaTest/AvaloniaTest.csproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "AvaloniaTest/ViewModels/MainViewModel.cs"
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "AvaloniaTest/Views/MainView.axaml"
}
],
"postActions": [
{
"id": "editor",
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens MainView and MainViewModel in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1;2"
},
"continueOnError": true
}
]
}
30 changes: 29 additions & 1 deletion templates/fsharp/app-mvvm/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,34 @@
"AvaloniaStableChosen": {
"type": "computed",
"value": "(AvaloniaVersion == \"0.10.18\")"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
}
},
"primaryOutputs": [
{ "path": "AvaloniaAppTemplate.fsproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "ViewModels/MainWindowViewModel.fs"
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "Views/MainWindow.axaml"
}
],
"postActions": [
{
"id": "editor",
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens MainWindow and MainWindowViewModel in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1;2"
},
"continueOnError": true
}
}
]
}
30 changes: 29 additions & 1 deletion templates/fsharp/app/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,34 @@
"AvaloniaStableChosen": {
"type": "computed",
"value": "(AvaloniaVersion == \"0.10.18\")"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
}
},
"primaryOutputs": [
{ "path": "AvaloniaAppTemplate.fsproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "MainWindow.axaml.fs"
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "MainWindow.axaml"
}
],
"postActions": [
{
"id": "editor",
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens MainWindow in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1;2"
},
"continueOnError": true
}
}
]
}
30 changes: 29 additions & 1 deletion templates/fsharp/xplat/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,34 @@
],
"replaces": "FrameworkParameter",
"defaultValue": "net7.0"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
}
}
},
"primaryOutputs": [
{ "path": "AvaloniaTest/AvaloniaTest.fsproj" },
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "AvaloniaTest/ViewModels/MainViewModel.fs"
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "AvaloniaTest/Views/MainView.axaml"
}
],
"postActions": [
{
"id": "editor",
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"description": "Opens MainView and MainViewModel in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1;2"
},
"continueOnError": true
}
]
}

0 comments on commit f7312ca

Please sign in to comment.