feat: add blazor template - #656
Conversation
…e arguments to the beforeDevCommand
… project and solution
amrbashir
left a comment
There was a problem hiding this comment.
We also need to add a new category in categories.rs file
Does this imply creating a new package manager as well? Regarding the rest, everything is finished, only this point needs to be clarified. |
yeah it is a bit weird, let's go with Ideally we would publish the Tauri CLI to NuGet and users can call it using |
Yes this is possible, I'm going to do a poc, before that, what commands are required? Just the command to launch Tauri? |
|
It should be able to run any tauri subcommand |
Alright, I just have to make a wrapper, which will implicitly call cargo in this case |
No need for a wrapper, I was wondering if it is possible, we could publish tauri-cli to NuGet and then this template could include it as a dependency |
publish tauri-cli on Nuget? But tauri-cli is made in rust, isn't it? |
|
yeah, can't we publish a prebuilt binary there? |
|
anyways, let's just add these categories for now and we can see about publishing tauri-cli to nuget later. |
|
also make sure to update https://github.com/tauri-apps/create-tauri-app/blob/dev/.scripts/generate-templates-matrix.js and https://github.com/tauri-apps/create-tauri-app/blob/dev/.github/workflows/templates-test.yml so the new template can be tested in CI |
then we need to replace with a supported character it in these places |
… test github action
… test github action
|
looks like you need to run |
👍 |
|
It's all good for me, I think we're not too bad here @amrbashir |
amrbashir
left a comment
There was a problem hiding this comment.
Sorry for the delay, I left a few final comments and this should be ready to go.
| working-directory: ${{ (matrix.settings.manager == 'dotnet') && 'TauriApp' || 'tauri-app' }} | ||
|
|
||
| - run: ${{ matrix.settings.install_cmd }} | ||
| if: matrix.settings.install_cmd != '' | ||
| working-directory: tauri-app | ||
| working-directory: ${{ (matrix.settings.manager == 'dotnet') && 'TauriApp' || 'tauri-app' }} | ||
|
|
||
| - run: ${{ matrix.settings.run_cmd }} tauri build ${{ matrix.settings.no_bundle_flag }} | ||
| if: matrix.settings.manager != 'npm' | ||
| working-directory: tauri-app | ||
| working-directory: ${{ (matrix.settings.manager == 'dotnet') && 'TauriApp' || 'tauri-app' }} |
There was a problem hiding this comment.
when bootstrapping a dotnet project it should support tauri-app too, we shouldn't handle it here at all, we just need to convert tauri-app to TauriApp automatically in in the template in the files that require it to be without -, I guess for example that would be Program.cs.lte, and in that file we change {% project_name %} to {% project_name_upper_case %}. We will need to inject that variable into the template data though.
| @@ -0,0 +1,11 @@ | |||
| using Microsoft.AspNetCore.Components.Web; | |||
| using Microsoft.AspNetCore.Components.WebAssembly.Hosting; | |||
| using {% project_name %}; | |||
There was a problem hiding this comment.
I think this one
| using {% project_name %}; | |
| using {% project_name_uppercase %}; |
| @using Microsoft.AspNetCore.Components.Web.Virtualization | ||
| @using Microsoft.AspNetCore.Components.WebAssembly.Http | ||
| @using Microsoft.JSInterop | ||
| @using {% project_name %} |
There was a problem hiding this comment.
and this one
| @using {% project_name %} | |
| @using {% project_name_uppercase %} |
|
Normally, this time, it’s the right one @amrbashir |
add blazor template for create tauri app with blazor
Screen.Recording.-.Made.with.FlexClip.5.webm