v10: Project template database/connection string improvements (#12407)

* Add new connection-string-provider-name parameter

* Use template value forms to correctly encode JSON values

* Add new development-database-type parameter

* Update package template and fix App_Plugins directory rename

* Remove conflicting short parameter name

* Lowercase framework parameter to align with MS templates

* Cleanup default template settings

* Write unattended install parameters when either connection string or development database is set

* Include RootNamespace in UmbracoPackage template

* Update Umbraco specific gitignore rules

* Revert "Lowercase framework parameter to align with MS templates"

This reverts commit 22de389272a7e119df569ec2e54190265f6d0ae0.

* Add exclude-gitignore parameter

* Update template schemas

* Add minimal-gitignore parameter
This commit is contained in:
Ronald Barendse
2022-05-19 08:36:04 +02:00
committed by GitHub
parent 8d0bdb7ef6
commit 8d8592092f
13 changed files with 296 additions and 311 deletions

View File

@@ -7,26 +7,26 @@
<owners>Umbraco HQ</owners>
<license type="expression">MIT</license>
<projectUrl>https://umbraco.com/</projectUrl>
<icon>icon.png</icon>
<icon>icon.png</icon>
<iconUrl>https://umbraco.com/dist/nuget/logo-small.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Umbraco CMS templates for .NET Core Template Engine available through the dotnet CLI's new command</description>
<description>Umbraco CMS templates for .NET Core Template Engine available through the dotnet CLI's new command</description>
<language>en-US</language>
<tags>umbraco</tags>
<repository type="git" url="https://github.com/umbraco/Umbraco-CMS" />
<repository type="git" url="https://github.com/umbraco/Umbraco-CMS" />
<packageTypes>
<packageType name="Template" />
<packageType name="Template" />
</packageTypes>
</metadata>
<files>
<file src="icon.png" />
<file src="UmbracoPackage\**" target="UmbracoPackage" exclude="bin;obj" />
<file src="UmbracoProject\**" target="UmbracoProject" exclude="bin;obj" />
<file src="..\src\Umbraco.Web.UI\Program.cs" target="UmbracoProject" />
<file src="..\src\Umbraco.Web.UI\Startup.cs" target="UmbracoProject" />
<file src="..\src\Umbraco.Web.UI\Views\Partials\blocklist\**" target="UmbracoProject\Views\Partials\blocklist" />
<file src="..\src\Umbraco.Web.UI\Views\Partials\grid\**" target="UmbracoProject\Views\Partials\grid" />
<file src="..\src\Umbraco.Web.UI\Views\_ViewImports.cshtml" target="UmbracoProject\Views\_ViewImports.cshtml" />
<file src="..\src\Umbraco.Web.UI\wwwroot\favicon.ico" target="UmbracoProject\wwwroot" />
</files>
<files>
<file src="icon.png" />
<file src="UmbracoPackage\**" target="UmbracoPackage" exclude="bin;obj" />
<file src="UmbracoProject\**" target="UmbracoProject" exclude="bin;obj" />
<file src="..\src\Umbraco.Web.UI\Program.cs" target="UmbracoProject" />
<file src="..\src\Umbraco.Web.UI\Startup.cs" target="UmbracoProject" />
<file src="..\src\Umbraco.Web.UI\Views\Partials\blocklist\**" target="UmbracoProject\Views\Partials\blocklist" />
<file src="..\src\Umbraco.Web.UI\Views\Partials\grid\**" target="UmbracoProject\Views\Partials\grid" />
<file src="..\src\Umbraco.Web.UI\Views\_ViewImports.cshtml" target="UmbracoProject\Views\_ViewImports.cshtml" />
<file src="..\src\Umbraco.Web.UI\wwwroot\favicon.ico" target="UmbracoProject\wwwroot" />
</files>
</package>

View File

@@ -1,5 +1,5 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"$schema": "https://json.schemastore.org/dotnetcli.host.json",
"symbolInfo": {
"Framework": {
"longName": "Framework",

View File

@@ -1,15 +1,15 @@
{
"$schema": "http://json.schemastore.org/vs-2017.3.host",
"$schema": "https://json.schemastore.org/ide.host.json",
"order": 0,
"icon": "../../icon.png",
"description": {
"id": "UmbracoPackage",
"text": "Umbraco Package - An empty Umbraco CMS package/plugin"
"text": "Umbraco Package - An empty Umbraco CMS package/plugin."
},
"symbolInfo": [
{
"id": "UmbracoVersion",
"isVisible": "true"
"isVisible": true
}
]
}

View File

@@ -1,5 +1,5 @@
{
"$schema": "http://json.schemastore.org/template",
"$schema": "https://json.schemastore.org/template.json",
"author": "Umbraco HQ",
"classifications": [
"Web",
@@ -9,7 +9,7 @@
"Plugin"
],
"name": "Umbraco Package",
"description": "An empty Umbraco package/plugin project ready to get started",
"description": "An empty Umbraco package/plugin project ready to get started.",
"groupIdentity": "Umbraco.Templates.UmbracoPackage",
"identity": "Umbraco.Templates.UmbracoPackage.CSharp",
"shortName": "umbracopackage",
@@ -44,30 +44,14 @@
"defaultValue": "10.0.0-rc1",
"replaces": "UMBRACO_VERSION_FROM_TEMPLATE"
},
"namespaceReplacer": {
"type": "generated",
"generator": "regex",
"dataType": "string",
"parameters": {
"source": "name",
"steps": [
{
"regex": "\\s",
"replacement": "_"
},
{
"regex": "-",
"replacement": "_"
},
{
"regex": "^[^a-zA-Z_]+",
"replacement": "_"
}
]
},
"Namespace": {
"type": "derived",
"valueSource": "name",
"valueTransform": "safe_namespace",
"fileRename": "UmbracoPackage",
"replaces": "UmbracoPackage"
},
"msbuildReplacer": {
"MsBuildName": {
"type": "generated",
"generator": "regex",
"dataType": "string",

View File

@@ -1,29 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ContentTargetFolders>.</ContentTargetFolders>
<Product>UmbracoPackage</Product>
<PackageId>UmbracoPackage</PackageId>
<Title>UmbracoPackage</Title>
<Description>...</Description>
<Product>...</Product>
<PackageTags>umbraco plugin package</PackageTags>
<RootNamespace>UmbracoPackage</RootNamespace>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ContentTargetFolders>.</ContentTargetFolders>
<Product>UmbracoPackage</Product>
<PackageId>UmbracoPackage</PackageId>
<Title>UmbracoPackage</Title>
<Description>...</Description>
<PackageTags>umbraco plugin package</PackageTags>
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">UmbracoPackage</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Umbraco.Cms.Web.Website" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Umbraco.Cms.Web.Website" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="UMBRACO_VERSION_FROM_TEMPLATE" />
</ItemGroup>
<ItemGroup>
<Content Include="App_Plugins\UmbracoPackage\**\*.*">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
</Content>
<None Include="build\**\*.*">
<Pack>true</Pack>
<PackagePath>buildTransitive</PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="App_Plugins\UmbracoPackage\**">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
</Content>
<None Include="build\**">
<Pack>true</Pack>
<PackagePath>buildTransitive</PackagePath>
</None>
</ItemGroup>
</Project>

View File

@@ -1,5 +1,4 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UmbracoPackageMsBuildContentFilesPath>$(MSBuildThisFileDirectory)..\App_Plugins\UmbracoPackage\**\*.*</UmbracoPackageMsBuildContentFilesPath>
</PropertyGroup>
@@ -8,16 +7,15 @@
<ItemGroup>
<UmbracoPackageMsBuildContentFiles Include="$(UmbracoPackageMsBuildContentFilesPath)" />
</ItemGroup>
<Message Text="Copying UmbracoPackage files: $(UmbracoPackageMsBuildContentFilesPath) - #@(UmbracoPackageMsBuildContentFiles->Count()) files" Importance="high" />
<Message Text="Copying UmbracoPackage files: $(UmbracoPackageMsBuildContentFilesPath) - #@(UmbracoPackageMsBuildContentFiles->Count()) files" Importance="high" />
<Copy SourceFiles="@(UmbracoPackageMsBuildContentFiles)" DestinationFiles="@(UmbracoPackageMsBuildContentFiles->'$(MSBuildProjectDirectory)\App_Plugins\UmbracoPackage\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
</Target>
<Target Name="ClearUmbracoPackageMsBuildAssets" BeforeTargets="Clean">
<ItemGroup>
<UmbracoPackageMsBuildDir Include="$(MSBuildProjectDirectory)\App_Plugins\UmbracoPackage\" />
</ItemGroup>
<Message Text="Clear old UmbracoPackage data" Importance="high" />
<RemoveDir Directories="@(UmbracoPackageMsBuildDir)" />
<Message Text="Clear old UmbracoPackage data" Importance="high" />
<RemoveDir Directories="@(UmbracoPackageMsBuildDir)" />
</Target>
</Project>

View File

@@ -1,3 +1,4 @@
#if (!MinimalGitignore)
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
@@ -453,35 +454,27 @@ $RECYCLE.BIN/
!.vscode/launch.json
!.vscode/extensions.json
#endif
##
## Umbraco CMS .NETCore
## Umbraco CMS
##
# Dont commit Umbraco TEMP folder containing Examine Indexes, NuCache etc
**/umbraco/Data/TEMP/
# JSON schema file for appsettings.json
appsettings-schema.json
# Umbraco log files
**/umbraco/Logs/
# Packages created from the backoffice (package.xml/package.zip)
/umbraco/Data/CreatedPackages/
# Umbraco backoffice language files
# Nuget package Umbraco.Cms.StaticAssets will copy them in during dotnet build
# Customize langguage files in /config/lang/{language}.user.xml
**/umbraco/config/lang/
# Temp folder containing Examine indexes, NuCache, MediaCache, etc.
/umbraco/Data/TEMP/
# JSON Schema file for appsettings
# This is auto generated from the build
**/umbraco/config/appsettings-schema.json
# SQLite database files
/umbraco/Data/*.sqlite.db
/umbraco/Data/*.sqlite.db-shm
/umbraco/Data/*.sqlite.db-wal
# This is the no-nodes, installer & upgrader pages from Umbraco
# Nuget package Umbraco.Cms.StaticAssets will copy them in during dotnet build
**/umbraco/UmbracoWebsite/
**/umbraco/UmbracoInstall/
**/umbraco/UmbracoBackOffice/
# Log files
/umbraco/Logs/
# Comment out the line below if you wish to change or add any new templates to PartialView Macros
**/umbraco/PartialViewMacros/
# Umbraco Static Assets of Backoffice
# Nuget package Umbraco.Cms.StaticAssets will copy them in during dotnet build
**/wwwroot/umbraco/
# Media files
/wwwroot/media/

View File

@@ -1,5 +1,5 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"$schema": "https://json.schemastore.org/dotnetcli.host.json",
"symbolInfo": {
"Framework": {
"longName": "Framework",
@@ -17,6 +17,26 @@
"longName": "no-restore",
"shortName": ""
},
"ExcludeGitignore": {
"longName": "exclude-gitignore",
"shortName": ""
},
"MinimalGitignore": {
"longName": "minimal-gitignore",
"shortName": ""
},
"ConnectionString": {
"longName": "connection-string",
"shortName": ""
},
"ConnectionStringProviderName": {
"longName": "connection-string-provider-name",
"shortName": ""
},
"DevelopmentDatabaseType": {
"longName": "development-database-type",
"shortName": ""
},
"UnattendedUserName": {
"longName": "friendly-name",
"shortName": ""
@@ -29,10 +49,6 @@
"longName": "password",
"shortName": ""
},
"ConnectionString": {
"longName": "connection-string",
"shortName": ""
},
"NoNodesViewPath": {
"longName": "no-nodes-view-path",
"shortName": ""
@@ -44,8 +60,9 @@
},
"usageExamples": [
"dotnet new umbraco -n MyNewProject",
"dotnet new umbraco -n MyNewProjectUsingSqlCE -ce",
"dotnet new umbraco -n MyNewProject --no-restore",
"dotnet new umbraco -n MyNewProject --development-database-type SQLite",
"dotnet new umbraco -n MyNewProject --development-database-type LocalDB",
"dotnet new umbraco -n MyNewProject --friendly-name \"Friendly Admin User\" --email admin@example.com --password password1234 --connection-string \"Server=ConnectionStringHere\""
]
}

View File

@@ -1,47 +1,63 @@
{
"$schema": "http://json.schemastore.org/vs-2017.3.host",
"$schema": "https://json.schemastore.org/ide.host.json",
"order": 0,
"icon": "../../icon.png",
"description": {
"id": "UmbracoProject",
"text": "Umbraco Web Application - An empty Umbraco CMS web application"
"text": "Umbraco Web Application - An empty Umbraco CMS web application."
},
"symbolInfo": [
{
"id": "UmbracoVersion",
"isVisible": "true"
"isVisible": true
},
{
"id": "UseHttpsRedirect",
"isVisible": "true"
"isVisible": true
},
{
"id": "SkipRestore",
"isVisible": "true"
"isVisible": true
},
{
"id": "UnattendedUserName",
"isVisible": "true"
"id": "ExcludeGitignore",
"isVisible": true
},
{
"id": "UnattendedUserEmail",
"isVisible": "true"
},
{
"id": "UnattendedUserPassword",
"isVisible": "true"
"id": "MinimalGitignore",
"isVisible": true
},
{
"id": "ConnectionString",
"isVisible": "true"
"isVisible": true
},
{
"id": "ConnectionStringProviderName",
"isVisible": true
},
{
"id": "DevelopmentDatabaseType",
"isVisible": true
},
{
"id": "UnattendedUserName",
"isVisible": true
},
{
"id": "UnattendedUserEmail",
"isVisible": true
},
{
"id": "UnattendedUserPassword",
"isVisible": true
},
{
"id": "NoNodesViewPath",
"isVisible": "true"
"isVisible": true
},
{
"id": "PackageProjectName",
"isVisible": "true"
"isVisible": true
}
]
}

View File

@@ -1,5 +1,5 @@
{
"$schema": "http://json.schemastore.org/template",
"$schema": "https://json.schemastore.org/template.json",
"author": "Umbraco HQ",
"classifications": [
"Web",
@@ -7,7 +7,7 @@
"Umbraco"
],
"name": "Umbraco Project",
"description": "An empty Umbraco project ready to get started",
"description": "An empty Umbraco project ready to get started.",
"groupIdentity": "Umbraco.Templates.UmbracoProject",
"identity": "Umbraco.Templates.UmbracoProject.CSharp",
"shortName": "umbraco",
@@ -18,6 +18,18 @@
"sourceName": "UmbracoProject",
"defaultName": "UmbracoProject1",
"preferNameDirectory": true,
"sources": [
{
"modifiers": [
{
"condition": "(ExcludeGitignore)",
"exclude": [
".gitignore"
]
}
]
}
],
"symbols": {
"Framework": {
"displayName": "Framework",
@@ -56,187 +68,173 @@
"datatype": "bool",
"defaultValue": "false"
},
"UnattendedUserName": {
"displayName": "Unattended user name",
"description": "Used to specify the name of the default admin user when using unattended install (stored as plain text).",
"ExcludeGitignore": {
"displayName": "Exclude .gitignore",
"description": "Whether to exclude .gitignore from the generated template.",
"type": "parameter",
"datatype": "string",
"defaultValue": ""
"datatype": "bool",
"defaultValue": "false"
},
"UnattendedUserNameReplacer": {
"type": "generated",
"generator": "regex",
"dataType": "string",
"parameters": {
"source": "UnattendedUserName",
"steps": [
{
"regex": "\\\\",
"replacement": "\\\\"
},
{
"regex": "\\\"",
"replacement": "\\\""
},
{
"regex": "\\\n",
"replacement": "\\\n"
},
{
"regex": "\\\t",
"replacement": "\\\t"
}
]
},
"replaces": "UNATTENDED_USER_NAME_FROM_TEMPLATE"
},
"UnattendedUserEmail": {
"displayName": "Unattended user email",
"description": "Used to specify the email of the default admin user when using unattended install (stored as plain text).",
"MinimalGitignore": {
"displayName": "Minimal .gitignore",
"description": "Whether to only include minimal (Umbraco specific) rules in the .gitignore.",
"type": "parameter",
"datatype": "string",
"defaultValue": ""
},
"UnattendedUserEmailReplacer": {
"type": "generated",
"generator": "regex",
"dataType": "string",
"parameters": {
"source": "UnattendedUserEmail",
"steps": [
{
"regex": "\\\\",
"replacement": "\\\\"
},
{
"regex": "\\\"",
"replacement": "\\\""
},
{
"regex": "\\\n",
"replacement": "\\\n"
},
{
"regex": "\\\t",
"replacement": "\\\t"
}
]
},
"replaces": "UNATTENDED_USER_EMAIL_FROM_TEMPLATE"
},
"UnattendedUserPassword": {
"displayName": "Unattended user password",
"description": "Used to specify the password of the default admin user when using unattended install (stored as plain text).",
"type": "parameter",
"datatype": "string",
"defaultValue": ""
},
"UnattendedUserPasswordReplacer": {
"type": "generated",
"generator": "regex",
"dataType": "string",
"parameters": {
"source": "UnattendedUserPassword",
"steps": [
{
"regex": "\\\\",
"replacement": "\\\\"
},
{
"regex": "\\\"",
"replacement": "\\\""
},
{
"regex": "\\\n",
"replacement": "\\\n"
},
{
"regex": "\\\t",
"replacement": "\\\t"
}
]
},
"replaces": "UNATTENDED_USER_PASSWORD_FROM_TEMPLATE"
"datatype": "bool",
"defaultValue": "false"
},
"ConnectionString": {
"displayName": "Connection string",
"description": "Database connection string used by Umbraco.",
"type": "parameter",
"datatype": "string",
"defaultValue": ""
},
"ConnectionStringReplacer": {
"type": "generated",
"generator": "regex",
"dataType": "string",
"parameters": {
"source": "ConnectionString",
"steps": [
{
"regex": "\\\\",
"replacement": "\\\\"
},
{
"regex": "\\\"",
"replacement": "\\\""
},
{
"regex": "\\\n",
"replacement": "\\\n"
},
{
"regex": "\\\t",
"replacement": "\\\t"
}
"defaultValue": "",
"forms": {
"global": [
"jsonEncode"
]
},
"replaces": "CONNECTION_STRING_FROM_TEMPLATE"
},
"ConnectionStringProviderName": {
"displayName": "Connection string provider name",
"description": "Database connection string provider name used by Umbraco.",
"type": "parameter",
"datatype": "string",
"defaultValue": "Microsoft.Data.SqlClient",
"forms": {
"global": [
"jsonEncode"
]
},
"replaces": "CONNECTION_STRING_PROVIDER_NAME_FROM_TEMPLATE"
},
"HasConnectionString": {
"type": "computed",
"value": "(ConnectionString != \"\")"
"value": "(ConnectionString != '')"
},
"DevelopmentDatabaseType": {
"displayName": "Development database type",
"description": "Database type used by Umbraco for development.",
"type": "parameter",
"datatype": "choice",
"choices": [
{
"displayName": "None",
"description": "Do not configure a database for development.",
"choice": "None"
},
{
"displayName": "SQLite",
"description": "Use embedded SQLite database.",
"choice": "SQLite"
},
{
"displayName": "SQL Server Express LocalDB",
"description": "Use embedded LocalDB database (requires SQL Server Express with Advanced Services).",
"choice": "LocalDB"
}
],
"defaultValue": "None"
},
"DevelopmentConnectionString": {
"type": "generated",
"datatype": "string",
"generator": "switch",
"parameters": {
"cases": [
{
"condition": "(DevelopmentDatabaseType == 'SQLite')",
"value": "Data Source=|DataDirectory|/Umbraco.sqlite.db;Cache=Shared;Foreign Keys=True;Pooling=True"
},
{
"condition": "(DevelopmentDatabaseType == 'LocalDB')",
"value": "Data Source=(localdb)\\\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\\\Umbraco.mdf;Integrated Security=True"
}
]
},
"replaces": "CONNECTION_STRING_DEVELOPMENT_FROM_TEMPLATE"
},
"DevelopmentConnectionStringProviderName": {
"type": "generated",
"datatype": "string",
"generator": "switch",
"parameters": {
"cases": [
{
"condition": "(DevelopmentDatabaseType == 'SQLite')",
"value": "Microsoft.Data.SQLite"
},
{
"condition": "(true)",
"value": "Microsoft.Data.SqlClient"
}
]
},
"replaces": "CONNECTION_STRING_PROVIDER_NAME_DEVELOPMENT_FROM_TEMPLATE"
},
"HasDevelopmentConnectionString": {
"type": "computed",
"value": "(DevelopmentConnectionString != '')"
},
"UnattendedUserName": {
"displayName": "Unattended user name",
"description": "Used to specify the name of the default admin user when using unattended install on development (stored as plain text).",
"type": "parameter",
"datatype": "string",
"defaultValue": "",
"forms": {
"global": [
"jsonEncode"
]
},
"replaces": "UNATTENDED_USER_NAME_FROM_TEMPLATE"
},
"UnattendedUserEmail": {
"displayName": "Unattended user email",
"description": "Used to specify the email of the default admin user when using unattended install on development (stored as plain text).",
"type": "parameter",
"datatype": "string",
"defaultValue": "",
"forms": {
"global": [
"jsonEncode"
]
},
"replaces": "UNATTENDED_USER_EMAIL_FROM_TEMPLATE"
},
"UnattendedUserPassword": {
"displayName": "Unattended user password",
"description": "Used to specify the password of the default admin user when using unattended install on development (stored as plain text).",
"type": "parameter",
"datatype": "string",
"defaultValue": "",
"forms": {
"global": [
"jsonEncode"
]
},
"replaces": "UNATTENDED_USER_PASSWORD_FROM_TEMPLATE"
},
"UsingUnattenedInstall": {
"type": "computed",
"value": "(UnattendedUserName != \"\" && UnattendedUserEmail != \"\" && UnattendedUserPassword != \"\" && ConnectionString != \"\")"
"value": "(UnattendedUserName != '' && UnattendedUserEmail != '' && UnattendedUserPassword != '' && (HasConnectionString || HasDevelopmentConnectionString))"
},
"NoNodesViewPath": {
"displayName": "No nodes view path",
"description": "Path to a custom view presented with the Umbraco installation contains no published content",
"description": "Path to a custom view presented with the Umbraco installation contains no published content.",
"type": "parameter",
"datatype": "string",
"defaultValue": ""
},
"NoNodesViewPathReplacer": {
"type": "generated",
"generator": "regex",
"dataType": "string",
"parameters": {
"source": "NoNodesViewPath",
"steps": [
{
"regex": "\\\\",
"replacement": "\\\\"
},
{
"regex": "\\\"",
"replacement": "\\\""
},
{
"regex": "\\\n",
"replacement": "\\\n"
},
{
"regex": "\\\t",
"replacement": "\\\t"
}
"defaultValue": "",
"forms": {
"global": [
"jsonEncode"
]
},
"replaces": "NO_NODES_VIEW_PATH_FROM_TEMPLATE"
},
"HasNoNodesViewPath": {
"type": "computed",
"value": "(NoNodesViewPath != \"\")"
"value": "(NoNodesViewPath != '')"
},
"PackageProjectName": {
"displayName": "Umbraco package project name",
@@ -246,27 +244,10 @@
"defaultValue": "",
"replaces": "PACKAGE_PROJECT_NAME_FROM_TEMPLATE"
},
"NamespaceReplacer": {
"type": "generated",
"generator": "regex",
"dataType": "string",
"parameters": {
"source": "name",
"steps": [
{
"regex": "\\s",
"replacement": "_"
},
{
"regex": "-",
"replacement": "_"
},
{
"regex": "^[^a-zA-Z_]+",
"replacement": "_"
}
]
},
"Namespace": {
"type": "derived",
"valueSource": "name",
"valueTransform": "safe_namespace",
"replaces": "Umbraco.Cms.Web.UI"
},
"HttpPort": {

View File

@@ -13,7 +13,7 @@
<!-- Force Windows to use ICU. Otherwise Windows 10 2019H1+ will do it, but older Windows 10 and most, if not all, Windows Server editions will run NLS -->
<ItemGroup>
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9" />
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2.0.9" Condition="$(RuntimeIdentifier.StartsWith('linux')) Or $(RuntimeIdentifier.StartsWith('win')) Or ('$(RuntimeIdentifier)' == '' And !$([MSBuild]::IsOSPlatform('osx')))" />
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2.0.9" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
</ItemGroup>
<Import Project="..\PACKAGE_PROJECT_NAME_FROM_TEMPLATE\build\PACKAGE_PROJECT_NAME_FROM_TEMPLATE.targets" Condition="'$(PackageProjectName)' != ''" />
@@ -25,9 +25,9 @@
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot" />
</ItemGroup>
<!-- Keep this as false if ModelsBuilder mode is InMemoryAuto -->
<PropertyGroup>

View File

@@ -17,9 +17,10 @@
}
]
},
//#if (HasConnectionString)
//#if (HasDevelopmentConnectionString)
"ConnectionStrings": {
"umbracoDbDSN": "CONNECTION_STRING_FROM_TEMPLATE"
"umbracoDbDSN": "CONNECTION_STRING_DEVELOPMENT_FROM_TEMPLATE",
"umbracoDbDSN_ProviderName": "CONNECTION_STRING_PROVIDER_NAME_DEVELOPMENT_FROM_TEMPLATE"
},
//#endif
"Umbraco": {
@@ -35,19 +36,12 @@
"Content": {
"MacroErrors": "Throw"
},
"Global": {
"Smtp": {
"From": "your@email.here",
"Host": "localhost",
"Port": 25
}
},
"Hosting": {
"Debug": true
},
"RuntimeMinification": {
"useInMemoryCache": true,
"cacheBuster": "Timestamp"
"UseInMemoryCache": true,
"CacheBuster": "Timestamp"
}
}
}

View File

@@ -10,9 +10,12 @@
}
}
},
//#if (HasConnectionString)
"ConnectionStrings": {
"umbracoDbDSN": null
"umbracoDbDSN": "CONNECTION_STRING_FROM_TEMPLATE",
"umbracoDbDSN_ProviderName": "CONNECTION_STRING_PROVIDER_NAME_FROM_TEMPLATE"
},
//#endif
"Umbraco": {
"CMS": {
"Global": {