Skip to content

Commit

Permalink
Shopify and Xperience by Kentico integration (#7)
Browse files Browse the repository at this point in the history
Implemented Shopify integration into Xperience by Kentico on the DancingGoat sample project.
Implementation contains separate class library Kentico.Xperience.Shopify with all the necessary services.

---------

Co-authored-by: Martin Foukal <[email protected]>
Co-authored-by: michaljakubis <[email protected]>
  • Loading branch information
3 people authored May 20, 2024
1 parent 7afc52f commit 1b80e84
Show file tree
Hide file tree
Showing 461 changed files with 43,953 additions and 115 deletions.
1 change: 0 additions & 1 deletion .azuredevops/pipelines/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ parameters:
type: string
default: " "


resources:
repositories:
- repository: self
Expand Down
88 changes: 57 additions & 31 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 @@ -213,32 +213,32 @@ dotnet_diagnostic.IDE0018.severity = erro
csharp_style_var_elsewhere = true : error
csharp_style_var_for_built_in_types = false : error
csharp_style_var_when_type_is_apparent = true : error
dotnet_diagnostic.IDE0007.severity = error
dotnet_diagnostic.IDE0008.severity = error
dotnet_diagnostic.IDE0007.severity = suggestion
dotnet_diagnostic.IDE0008.severity = suggestion

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

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

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
dotnet_diagnostic.IDE0053.severity = error
csharp_style_expression_bodied_lambdas = true:error
dotnet_diagnostic.IDE0053.severity = suggestion

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 @@ -289,53 +289,79 @@ dotnet_diagnostic.IDE0080.severity = erro
dotnet_diagnostic.IDE0110.severity = warning

# IDE1006: Naming Styles
dotnet_diagnostic.IDE1006.severity = error
dotnet_diagnostic.IDE1006.severity = suggestion

# Naming Conventions
dotnet_naming_symbols.const_field_symbols.applicable_kinds = field
dotnet_naming_symbols.const_field_symbols.required_modifiers = const
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_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
dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
dotnet_style_namespace_match_folder = true:suggestion
17 changes: 15 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
name: "CI: Build and Test"

on:
push:
branches: [main]
paths:
- "**.cs"
- "**.tsx"
- "**.js"
- "**.csproj"
- "**.props"
- "**.targets"
- "**.sln"
- "**/Client/**/*.json"
pull_request:
branches: [main]
paths:
Expand Down Expand Up @@ -29,10 +40,12 @@ jobs:
DOTNET_NOLOGO: 1

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json

Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,10 @@ segments_2i
**/CMSModules/WebFarm/*

# Files Generated by this integration
**/App_Data/RepoTemplate/*
**/App_Data/Kentico.Xperience.Shopify/*
**/App_Data/CMSModules/SmartSearch/*
/examples/DancingGoat-Shopify/assets/ContentItems

# Publishing profiles
*.pubxml
*.pubxml.user
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "submodules/xperience-by-kentico-ecommerce-common"]
path = submodules/xperience-by-kentico-ecommerce-common
url = https://github.com/Kentico/xperience-by-kentico-ecommerce-common.git
branch = main
8 changes: 4 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/Kentico.Xperience.RepoTemplate.Sample/bin/Debug/net6.0/DancingGoat.dll",
"preLaunchTask": "dotnet: build",
"program": "${workspaceFolder}/examples/DancingGoat-Shopify/bin/Debug/net8.0/DancingGoat.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Kentico.Xperience.RepoTemplate.Sample",
"cwd": "${workspaceFolder}/examples/DancingGoat-Shopify",
"stopAtEntry": false,
"serverReadyAction": {
"action": "openExternally",
Expand All @@ -21,7 +21,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
"/Views": "${workspaceFolder}/examples/DancingGoat-Shopify/Views"
}
},
{
Expand Down
6 changes: 1 addition & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@
"editor.defaultFormatter": "ms-dotnettools.csharp"
},

"dotnet.defaultSolution": "Kentico.Xperience.RepoTemplate.sln",

"eslint.workingDirectories": [
"./src/Kentico.Xperience.RepoTemplate/Admin/Client"
],
"dotnet.defaultSolution": "Kentico.Xperience.Shopify.sln",

"files.associations": {
".azuredevops/**/*.yml": "azure-pipelines"
Expand Down
39 changes: 2 additions & 37 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "install",
"path": "src/Kentico.Xperience.RepoTemplate/Admin/Client",
"group": "clean",
"problemMatcher": [],
"label": "npm: install - src/Kentico.Xperience.RepoTemplate/Admin/Client",
"detail": "install dependencies from package"
},
{
"type": "dotnet",
"task": "build",
Expand All @@ -24,7 +15,7 @@
"problemMatcher": ["$msCompile"],
"group": "none",
"options": {
"cwd": "${workspaceFolder}/src/Kentico.Xperience.RepoTemplate/"
"cwd": "${workspaceFolder}/examples/DancingGoat-Shopify"
},
"label": "dotnet: format"
},
Expand All @@ -35,32 +26,6 @@
"group": "clean",
"label": "dotnet: clean"
},
{
"type": "npm",
"script": "build",
"path": "src/Kentico.Xperience.RepoTemplate/Admin/Client",
"group": "build",
"problemMatcher": [],
"label": "npm: build - src/Kentico.Xperience.RepoTemplate/Admin/Client",
"detail": "webpack --mode=production"
},
{
"type": "npm",
"script": "build:dev",
"path": "src/Kentico.Xperience.RepoTemplate/Admin/Client",
"group": "build",
"problemMatcher": [],
"label": "npm: build:dev - src/Kentico.Xperience.RepoTemplate/Admin/Client",
"detail": "webpack --mode=development"
},
{
"type": "npm",
"script": "start",
"path": "src/Kentico.Xperience.RepoTemplate/Admin/Client",
"problemMatcher": [],
"label": "npm: start - src/Kentico.Xperience.RepoTemplate/Admin/Client",
"detail": "webpack serve --mode development"
},
{
"label": "dotnet: watch DancingGoat",
"command": "dotnet",
Expand All @@ -69,7 +34,7 @@
"watch",
"run",
"--project",
"${workspaceFolder}/src/Kentico.Xperience.RepoTemplate.Sample/DancingGoat.csproj"
"${workspaceFolder}/examples/DancingGoat-Shopify/DancingGoat.csproj"
],
"options": {
"env": {
Expand Down
15 changes: 6 additions & 9 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
<VersionSuffix>prerelease-1</VersionSuffix>
<PackageLicenseExpression>MIT</PackageLicenseExpression>

<PackageProjectUrl>https://github.com/Kentico/REPOSITORY_NAME</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/Kentico/REPOSITORY_NAME/releases</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/Kentico/xperience-by-kentico-shopify</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/Kentico/xperience-by-kentico-shopify/releases</PackageReleaseNotes>
<PackageIcon>logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>xperience;kentico;aspnetcore</PackageTags>
<PackageTags>xperience;kentico;aspnetcore;shopify</PackageTags>
</PropertyGroup>

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)\images\logo.png" Pack="true" Visible="false" PackagePath="" />
<None Include="$(MSBuildThisFileDirectory)\README.md" Pack="true" PackagePath=""/>
<None Include="$(MSBuildThisFileDirectory)\README.md" Pack="true" Visible="false" PackagePath=""/>
</ItemGroup>

<PropertyGroup>
Expand All @@ -29,22 +29,19 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<CopyDocumentationFilesFromPackages>true</CopyDocumentationFilesFromPackages>
<CopyDebugSymbolFilesFromPackages>true</CopyDebugSymbolFilesFromPackages>
<NoWarn>$(NoWarn);1591</NoWarn>
<RootNamespace>Kentico.Xperience.RepoTemplate</RootNamespace>
<NoWarn>$(NoWarn);S101;S1121</NoWarn>

<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<TimestampServerUrl>http://timestamp.digicert.com</TimestampServerUrl>
</PropertyGroup>

<PropertyGroup Condition=" $(Configuration) == 'Release' ">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup Label="StaticCodeAnalysis">
<ItemGroup Label="StaticCodeAnalysis" Condition=" $(DisableCodeAnalysis) != 'True' ">
<PackageReference Include="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Loading

0 comments on commit 1b80e84

Please sign in to comment.