-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add blazor template #656
Conversation
…e arguments to the beforeDevCommand
… project and solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but, is there a bundler for tauri? I think using withGlobalTauri is not for release, excuse if this is incorrect i am a new dev myself
looks like you need to run |
👍 |
It's all good for me, I think we're not too bad here @amrbashir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, I left a few final comments and this should be ready to go.
.github/workflows/templates-test.yml
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this one
@using {% project_name %} | |
@using {% project_name_uppercase %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and the name of this file
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