Skip to content

Commit

Permalink
Merge pull request #6 from Kentico/feat/modularization
Browse files Browse the repository at this point in the history
Modular tags and new premade tags
  • Loading branch information
ondrejhenek authored Mar 18, 2024
2 parents f66a538 + 3a9fe7e commit 65fde66
Show file tree
Hide file tree
Showing 98 changed files with 16,408 additions and 4,913 deletions.
27 changes: 7 additions & 20 deletions .azuredevops/pipelines/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ stages:
- stage: Build
jobs:
- job: Build
displayName: Build, Sign, and Pack
displayName: Build, Sign, Test & Pack

pool:
name: ${{ parameters.AgentPoolName }}
Expand All @@ -50,7 +50,7 @@ stages:
- name: ProjectFolder
value: src/Kentico.Xperience.TagManager

- name: ProjectPath
- name: ProjectFilePath
value: src/Kentico.Xperience.TagManager/Kentico.Xperience.TagManager.csproj

steps:
Expand All @@ -59,7 +59,7 @@ stages:
inputs:
targetType: inline
script: |
$fileContent = Get-Content -Path './${{ variables.ProjectFolder }}/Frontend/package.json' -Raw
$fileContent = Get-Content -Path './${{ variables.ProjectFolder }}/Admin/Client/package.json' -Raw
$jsonObject = ConvertFrom-Json -InputObject $fileContent
# Get the value of engines.node
Expand All @@ -84,28 +84,15 @@ stages:
displayName: Restore dependencies
inputs:
command: restore
projects: ${{ variables.ProjectPath }}
projects: ${{ variables.ProjectFilePath }}
feedsToUse: select
restoreArguments: --locked-mode

- task: Npm@1
displayName: npm ci - Frontend
inputs:
command: "ci"
workingDir: ${{ variables.ProjectFolder }}/Frontend

- task: Npm@1
displayName: npm run build:prod - Frontend
inputs:
command: "custom"
customCommand: run build:prod
workingDir: ${{ variables.ProjectFolder }}/Frontend

- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
projects: ${{ variables.ProjectPath }}
projects: ${{ variables.ProjectFilePath }}
configuration: ${{ variables.Configuration }}
arguments: --no-restore --verbosity Detailed
env:
Expand All @@ -117,7 +104,7 @@ stages:
displayName: Create NuGet package
inputs:
command: pack
packagesToPack: ${{ variables.ProjectPath }}
packagesToPack: ${{ variables.ProjectFilePath }}
configuration: ${{ variables.Configuration }}
packDirectory: $(System.DefaultWorkingDirectory)/packages
includesymbols: true
Expand Down Expand Up @@ -169,4 +156,4 @@ stages:
packagesToPush: $(Pipeline.Workspace)/artifact/*.nupkg
nuGetFeedType: external
publishFeedCredentials: nuget.org
allowPackageConflicts: true
allowPackageConflicts: true
75 changes: 50 additions & 25 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ csharp_preserve_single_line_statements = fals
csharp_preserve_single_line_blocks = true

### Using directive options
csharp_using_directive_placement = outside_namespace : error
csharp_using_directive_placement = outside_namespace:error
dotnet_diagnostic.IDE0065.severity = error

# Code Style Rules
Expand Down Expand Up @@ -216,29 +216,29 @@ csharp_style_var_when_type_is_apparent = true
dotnet_diagnostic.IDE0007.severity = error
dotnet_diagnostic.IDE0008.severity = error

csharp_style_expression_bodied_constructors = true : error
csharp_style_expression_bodied_constructors = true:error
dotnet_diagnostic.IDE0021.severity = error

csharp_style_expression_bodied_methods = true : error
csharp_style_expression_bodied_methods = true:error
dotnet_diagnostic.IDE0022.severity = error

csharp_style_expression_bodied_operators = true : error
csharp_style_expression_bodied_operators = true:error
dotnet_diagnostic.IDE0023.severity = error
dotnet_diagnostic.IDE0024.severity = error

csharp_style_expression_bodied_properties = true : error
csharp_style_expression_bodied_properties = true:error
dotnet_diagnostic.IDE0025.severity = error

csharp_style_expression_bodied_indexers = true : error
csharp_style_expression_bodied_indexers = true:error
dotnet_diagnostic.IDE0026.severity = error

csharp_style_expression_bodied_accessors = true : error
csharp_style_expression_bodied_accessors = true:error
dotnet_diagnostic.IDE0027.severity = error

csharp_style_expression_bodied_lambdas = true : error
csharp_style_expression_bodied_lambdas = true:error
dotnet_diagnostic.IDE0053.severity = error

csharp_style_expression_bodied_local_functions = true : error
csharp_style_expression_bodied_local_functions = true:error
dotnet_diagnostic.IDE0061.severity = error

csharp_style_pattern_matching_over_as_with_null_check = true : error
Expand All @@ -256,10 +256,10 @@ dotnet_diagnostic.IDE0078.severity = erro
csharp_style_prefer_not_pattern = true : error
dotnet_diagnostic.IDE0083.severity = error

csharp_prefer_braces = true : error
csharp_prefer_braces = true:error
dotnet_diagnostic.IDE0011.severity = error

csharp_prefer_simple_using_statement = true : error
csharp_prefer_simple_using_statement = true:error
dotnet_diagnostic.IDE0063.severity = error

csharp_style_prefer_index_operator = true : warning
Expand Down Expand Up @@ -297,45 +297,70 @@ dotnet_naming_symbols.const_field_symbols.required_modifiers = cons
dotnet_naming_symbols.const_field_symbols.applicable_accessibilities = *
dotnet_naming_style.const_field_symbols.capitalization = pascal_case

dotnet_naming_rule.const_fields_must_be_pascal_case.severity = error
dotnet_naming_rule.const_fields_must_be_pascal_case.severity = error
dotnet_naming_rule.const_fields_must_be_pascal_case.symbols = const_field_symbols
dotnet_naming_rule.const_fields_must_be_pascal_case.style = const_field_symbols
dotnet_naming_rule.const_fields_must_be_pascal_case.style = const_field_symbols

dotnet_naming_symbols.private_field_symbol.applicable_kinds = field
dotnet_naming_symbols.private_field_symbol.applicable_accessibilities = private
dotnet_naming_style.private_field_style.capitalization = camel_case
dotnet_naming_rule.private_fields_are_camel_case.severity = warning
dotnet_naming_rule.private_fields_are_camel_case.severity = warning
dotnet_naming_rule.private_fields_are_camel_case.symbols = private_field_symbol
dotnet_naming_rule.private_fields_are_camel_case.style = private_field_style
dotnet_naming_rule.private_fields_are_camel_case.style = private_field_style

dotnet_naming_symbols.non_private_field_symbol.applicable_kinds = field
dotnet_naming_symbols.non_private_field_symbol.applicable_accessibilities = public,internal,friend,protected,protected_internal,protected_friend
dotnet_naming_style.non_private_field_style.capitalization = pascal_case
dotnet_naming_rule.non_private_fields_are_pascal_case.severity = warning
dotnet_naming_rule.non_private_fields_are_pascal_case.severity = warning
dotnet_naming_rule.non_private_fields_are_pascal_case.symbols = non_private_field_symbol
dotnet_naming_rule.non_private_fields_are_pascal_case.style = non_private_field_style
dotnet_naming_rule.non_private_fields_are_pascal_case.style = const_field_symbols

dotnet_naming_symbols.parameter_symbol.applicable_kinds = parameter
dotnet_naming_style.parameter_style.capitalization = camel_case
dotnet_naming_rule.parameters_are_camel_case.severity = warning
dotnet_naming_rule.parameters_are_camel_case.severity = warning
dotnet_naming_rule.parameters_are_camel_case.symbols = parameter_symbol
dotnet_naming_rule.parameters_are_camel_case.style = parameter_style
dotnet_naming_rule.parameters_are_camel_case.style = private_field_style

dotnet_naming_symbols.non_interface_type_symbol.applicable_kinds = class,struct,enum,delegate
dotnet_naming_style.non_interface_type_style.capitalization = pascal_case
dotnet_naming_rule.non_interface_types_are_pascal_case.severity = error
dotnet_naming_rule.non_interface_types_are_pascal_case.severity = error
dotnet_naming_rule.non_interface_types_are_pascal_case.symbols = non_interface_type_symbol
dotnet_naming_rule.non_interface_types_are_pascal_case.style = non_interface_type_style
dotnet_naming_rule.non_interface_types_are_pascal_case.style = const_field_symbols

dotnet_naming_symbols.interface_type_symbol.applicable_kinds = interface
dotnet_naming_style.interface_type_style.capitalization = pascal_case
dotnet_naming_style.interface_type_style.required_prefix = I
dotnet_naming_rule.interface_types_must_be_prefixed_with_I.severity = error
dotnet_naming_rule.interface_types_must_be_prefixed_with_i.severity = error
dotnet_naming_rule.interface_types_must_be_prefixed_with_I.symbols = interface_type_symbol
dotnet_naming_rule.interface_types_must_be_prefixed_with_I.style = interface_type_style
dotnet_naming_rule.interface_types_must_be_prefixed_with_i.style = interface_type_style

dotnet_naming_symbols.member_symbol.applicable_kinds = method,property,event
dotnet_naming_style.member_style.capitalization = pascal_case
dotnet_naming_rule.members_are_pascal_case.severity = error
dotnet_naming_rule.members_are_pascal_case.severity = error
dotnet_naming_rule.members_are_pascal_case.symbols = member_symbol
dotnet_naming_rule.members_are_pascal_case.style = member_style
dotnet_naming_rule.members_are_pascal_case.style = const_field_symbols
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_prefer_primary_constructors = true:suggestion

[*.{cs,vb}]
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
indent_size = 4
end_of_line = crlf
dotnet_style_coalesce_expression = true:error
dotnet_style_null_propagation = true:error
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:error
dotnet_style_prefer_auto_properties = true:warning
dotnet_style_object_initializer = true:error
dotnet_style_prefer_collection_expression = true:suggestion
dotnet_style_collection_initializer = true:error
dotnet_style_prefer_simplified_boolean_expressions = true:warning
dotnet_style_prefer_conditional_expression_over_assignment = true:error
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_explicit_tuple_names = true:error
dotnet_style_prefer_inferred_tuple_names = true:error
dotnet_style_prefer_inferred_anonymous_type_member_names = true:error
dotnet_style_prefer_compound_assignment = true:error
dotnet_style_prefer_simplified_interpolation = true:error
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,9 @@ node_modules
segments_2i

# Generated files
nuget-local/*.nupkg
nuget-local/*.snupkg
**/Client/dist/*

./src/Kentico.Xperience.TagManager/wwwroot/Scripts/ktc-tagmanager.js

**/CMSModules/WebFarm/*

#wwwroot folder
/src/Kentico.Xperience.TagManager/wwwroot/
8 changes: 3 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Authors>$(Company)</Authors>
<Copyright>Copyright © $(Company) $([System.DateTime]::Now.Year)</Copyright>
<Trademark>$(Company)™</Trademark>
<VersionPrefix>1.0.2</VersionPrefix>
<VersionPrefix>2.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<PackageLicenseExpression>MIT</PackageLicenseExpression>

Expand All @@ -22,17 +22,15 @@
</ItemGroup>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<CopyDocumentationFilesFromPackages>true</CopyDocumentationFilesFromPackages>
<CopyDebugSymbolFilesFromPackages>true</CopyDebugSymbolFilesFromPackages>
<NoWarn>$(NoWarn);1591</NoWarn>
<NoWarn>$(NoWarn);1591;S3267</NoWarn>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<TimestampServerUrl>http://timestamp.digicert.com</TimestampServerUrl>
</PropertyGroup>

<PropertyGroup Condition=" $(Configuration) == 'Release' ">
Expand Down
20 changes: 10 additions & 10 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<!-- When NuGet supports this property, we can specify a * as the Kentico.Xperience.TagManager package version for local testing -->
<CentralPackageFloatingVersionsEnabled Condition="'$(LOCAL_NUGET)' == 'true'">true</CentralPackageFloatingVersionsEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Kentico.Xperience.Admin" Version="28.1.0" />
<PackageVersion Include="Kentico.Xperience.WebApp" Version="28.1.0" />
<PackageVersion Include="kentico.xperience.azurestorage" Version="28.1.0" />
<PackageVersion Include="kentico.xperience.imageprocessing" Version="28.1.0" />
<PackageVersion Include="Kentico.Xperience.Admin" Version="28.3.1" />
<PackageVersion Include="Kentico.Xperience.WebApp" Version="28.3.1" />
<PackageVersion Include="kentico.xperience.azurestorage" Version="28.3.1" />
<PackageVersion Include="kentico.xperience.imageprocessing" Version="28.3.1" />
<PackageVersion Include="Kentico.Xperience.TagManager" Version="" Condition="'$(LOCAL_NUGET)' == 'true'" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.17.0.82934" />
<PackageVersion Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0-preview.1.24080.9" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.21.0.86780" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="NUnit" Version="4.0.1" />
<PackageVersion Include="NUnit" Version="4.1.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="NUnit.Analyzers" Version="3.10.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.0.1" />
<PackageVersion Include="coverlet.collector" Version="6.0.1" />
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
</ItemGroup>
</Project>
8 changes: 0 additions & 8 deletions Directory.build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,5 @@
<AssemblyToSign Include="$(XmlSerializersTargetPath)" Condition="Exists('$(XmlSerializersTargetPath)')" />
</ItemGroup>

<Exec Command="dotnet AzureSignTool sign --azure-key-vault-url $(AuthenticodeKeyVaultUrl) --azure-key-vault-tenant-id $(AuthenticodeTenantId) --azure-key-vault-client-id $(AuthenticodeClientId) --azure-key-vault-client-secret $(AuthenticodeClientSecret) --azure-key-vault-certificate $(AuthenticodeCertificateName) --timestamp-rfc3161 $(TimestampServerUrl) --skip-signed %(AssemblyToSign.Identity)" />
</Target>

<ItemGroup>
<Content Remove="*lock.json" />
<Content Remove="package.json" />
<None Remove="package.json" />
<None Remove="*lock.json" />
</ItemGroup>
</Project>
10 changes: 7 additions & 3 deletions Kentico.Xperience.TagManager.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DancingGoat", "examples\Dan
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{09AFE138-1980-445D-A1B1-5CE3C28BFD98}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
.markdownlint.json = .markdownlint.json
LICENSE.md = LICENSE.md
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{5AC3E3D1-A97D-42C3-A6D4-CC44897DD5E6}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
Directory.build.targets = Directory.build.targets
Directory.Packages.props = Directory.Packages.props
global.json = global.json
LICENSE.md = LICENSE.md
nuget.config = nuget.config
README.md = README.md
EndProjectSection
EndProject
Global
Expand Down
Loading

0 comments on commit 65fde66

Please sign in to comment.