https://discord.umbraco.com logo
In case you missed it, I have released a
# news
c
In case you missed it, I have released a beta of Clean starter kit that works with Umbraco 18.
Copy code
ps1
# Ensure we have the version specific Umbraco templates
dotnet new install Umbraco.Templates@18.0.0-beta2 --force

# Create solution/project
dotnet new sln --name "MySolution"
dotnet new umbraco --force -n "MyProject"   --friendly-name "Administrator" --email "admin@example.com" --password "1234567890" --development-database-type SQLite
dotnet sln add "MyProject"


#Add Packages
dotnet add "MyProject" package Clean --version 8.0.0-beta01

dotnet run --project "MyProject"
#Running
m
Sorry couldn't help myself... 🤓
Copy code
powershell
# Ensure we have the version specific Umbraco templates
dotnet new install Umbraco.Templates@18.0.0-beta2 --force

$solution = "MySolution"
$project = "MyProject"

# Create solution/project
dotnet new sln --name "$solution"
dotnet new umbraco --force -n "$project"   --friendly-name "Administrator" --email "admin@example.com" --password "1234567890" --development-database-type SQLite
dotnet sln add "$project"


#Add Packages
dotnet add "$project" package Clean --version 8.0.0-beta01

dotnet run --project "$project"
#Running
c
I like it, looks like a good candidate for a PR to PSW repo @Mike Chambers
w
Nice Mike - might want to add a comment/note to say run this in Powershell
On MacOS pwsh is not my default
c
Oh yeah scratch that we’ve been down that road before lol
m
Ah always forget about our linux/macos friends.. sorry...
so
Copy code
#run in the current directory(script file location), which should be the root of the repo
$currentPath = Split-Path -parent $MyInvocation.MyCommand.Definition

Set-Location -Path $currentPath
and
Copy code
# Ensure we only force install if we need too...
$templateList = dotnet new uninstall | Out-String #-NoNewline
$packageVersion = $templateList | Select-String '(?s)Umbraco.Templates.*Version: (.*?)\r\n'| Select-Object -expand Matches | Select-Object -expand Groups | Select-Object -ExpandProperty Value -Skip 1 -First 1
if ($packageVersion -ne $version)
{
    dotnet new install Umbraco.Templates::$version --force 
}
Copy code
#fire up VSstudio rather than run...
Invoke-Item ".\$solution.slnx"
Also off the cards..
w
Nice improvements Mike
c
I usually just type
Copy code
psw --default --auto-run
m
I tend to open in vscode and run/debug so that aligns the terminal working folder with the open file... (rather than executing in c:\users\{username})
Most of this comes from a tear up/tear down script for testing packages (local, gitinternal, nuget via --source) injecting some defaults into the appsettings.. https://cdn.discordapp.com/attachments/1506219000525225994/1506246817954795650/spin_up_vanilla_umb.ps1?ex=6a0d912a&is=6a0c3faa&hm=37c3742eb01ea41cac7605fc56659f29f414f2d0272980cf269a55ff012f2b34&
10 Views