Skip to content

Commit

Permalink
Merge pull request #29 from ljbc1994/feat/namespace-additional-updates
Browse files Browse the repository at this point in the history
feat: namespace updated to avoid conflicts with libs
  • Loading branch information
ljbc1994 authored Sep 4, 2021
2 parents 6c69abe + 859209f commit dac2473
Show file tree
Hide file tree
Showing 43 changed files with 155 additions and 124 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: build

on:
pull_request:
branches: [master]
paths-ignore:
- '**.md'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x

- name: Install npm dependencies
run: |
npm ci
working-directory: src/Ljbc1994.Blazor.IntersectionObserver

- name: Run tests
run: |
npm run test
working-directory: src/Ljbc1994.Blazor.IntersectionObserver

- name: Setup Dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
include-prerelease: true

- name: Dotnet build
run: dotnet build --configuration Release

- name: Dotnet pack
run: dotnet pack src/Ljbc1994.Blazor.IntersectionObserver/*.csproj --configuration Release --verbosity Detailed
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: release

on:
push:
branches: [master]
paths-ignore:
- '**.md'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x

- name: Install npm dependencies
run: |
npm ci
working-directory: src/Ljbc1994.Blazor.IntersectionObserver

- name: Run tests
run: |
npm run test
working-directory: src/Ljbc1994.Blazor.IntersectionObserver

- name: Setup Dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
include-prerelease: true

- name: Dotnet build
run: dotnet build --configuration Release

- name: Dotnet pack
run: dotnet pack src/Ljbc1994.Blazor.IntersectionObserver/*.csproj --configuration Release --verbosity Detailed

- name: Dotnet publish to nuget
run: dotnet nuget push src/Ljbc1994.Blazor.IntersectionObserver/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}


16 changes: 8 additions & 8 deletions Blazor.IntersectionObserver.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{06DF5E56-1E2
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{5D04FCF1-FEF2-4F22-BF8A-5ACD34C364D7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.IntersectionObserver", "src\Blazor.IntersectionObserver\Blazor.IntersectionObserver.csproj", "{08BF0C04-9C65-4477-836A-B4DFF36D2C28}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.IntersectionObserver.Client", "samples\Blazor.IntersectionObserver.Client\Blazor.IntersectionObserver.Client.csproj", "{F3CCFB30-6C8F-40A8-BF19-1E19A17DBF80}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.IntersectionObserver.Server", "samples\Blazor.IntersectionObserver.Server\Blazor.IntersectionObserver.Server.csproj", "{8F503EA1-622E-48C0-8BA4-51AE7D413697}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ljbc1994.Blazor.IntersectionObserver", "src\Ljbc1994.Blazor.IntersectionObserver\Ljbc1994.Blazor.IntersectionObserver.csproj", "{5EAE5F4C-24EF-45A4-B4BE-D5C24D5772ED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{08BF0C04-9C65-4477-836A-B4DFF36D2C28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08BF0C04-9C65-4477-836A-B4DFF36D2C28}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08BF0C04-9C65-4477-836A-B4DFF36D2C28}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08BF0C04-9C65-4477-836A-B4DFF36D2C28}.Release|Any CPU.Build.0 = Release|Any CPU
{F3CCFB30-6C8F-40A8-BF19-1E19A17DBF80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F3CCFB30-6C8F-40A8-BF19-1E19A17DBF80}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F3CCFB30-6C8F-40A8-BF19-1E19A17DBF80}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -31,16 +27,20 @@ Global
{8F503EA1-622E-48C0-8BA4-51AE7D413697}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F503EA1-622E-48C0-8BA4-51AE7D413697}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F503EA1-622E-48C0-8BA4-51AE7D413697}.Release|Any CPU.Build.0 = Release|Any CPU
{5EAE5F4C-24EF-45A4-B4BE-D5C24D5772ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5EAE5F4C-24EF-45A4-B4BE-D5C24D5772ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5EAE5F4C-24EF-45A4-B4BE-D5C24D5772ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5EAE5F4C-24EF-45A4-B4BE-D5C24D5772ED}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{08BF0C04-9C65-4477-836A-B4DFF36D2C28} = {06DF5E56-1E2C-4435-854E-0155228D42E6}
{F3CCFB30-6C8F-40A8-BF19-1E19A17DBF80} = {5D04FCF1-FEF2-4F22-BF8A-5ACD34C364D7}
{8F503EA1-622E-48C0-8BA4-51AE7D413697} = {5D04FCF1-FEF2-4F22-BF8A-5ACD34C364D7}
{5EAE5F4C-24EF-45A4-B4BE-D5C24D5772ED} = {06DF5E56-1E2C-4435-854E-0155228D42E6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2A1E800E-0698-42F3-8B5D-2788225893E5}
SolutionGuid = {2A1E800E-0698-42F3-8B5D-2788225893E5}
EndGlobalSection
EndGlobal
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- Set common properties regarding assembly information and nuget packages -->
<PropertyGroup>
<Authors>Louie Colgan</Authors>
<Product>Blazor.IntersectionObserver</Product>
<Product>Ljbc1994.Blazor.IntersectionObserver</Product>
<PackageId>BlazorIntersectionObserver</PackageId>
<Copyright>Copyright © 2020 - Louie Colgan</Copyright>
<Copyright>Copyright © 2021 - Louie Colgan</Copyright>
<Summary>Intersection Observer API wrapper for Blazor</Summary>
<PackageProjectUrl>https://github.com/ljbc1994/BlazorIntersectionObserver</PackageProjectUrl>
<PackageTags>Microsoft ASP.NET Core Blazor Intersection Observer</PackageTags>
Expand Down Expand Up @@ -33,7 +33,7 @@

<!-- Versioning properties -->
<PropertyGroup>
<VersionPrefix Condition=" '$(VersionPrefix)'=='' ">1.1.0</VersionPrefix>
<VersionPrefix Condition=" '$(VersionPrefix)'=='' ">3.0.0</VersionPrefix>
<VersionSuffix Condition=" '$(VersionSuffix)'=='' ">dev</VersionSuffix>
</PropertyGroup>

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ object which contains the observer entry! Easy!
#### Component setup

```razor
@using Blazor.IntersectionObserver
@using Ljbc1994.Blazor.IntersectionObserver
<IntersectionObserve>
<div @ref="context.Ref.Current">
Expand All @@ -73,7 +73,7 @@ object which contains the observer entry! Easy!
To directly use the service, you just need to inject it and observe the element(s).

```razor
@using Blazor.IntersectionObserver
@using Ljbc1994.Blazor.IntersectionObserver
@inject IIntersectionObserverService ObserverService
<img @ref="ImageElement" src="@(IsIntersecting ? "https://www.placecage.com/g/500/500" : "")"/>
Expand Down Expand Up @@ -182,7 +182,7 @@ observer.Disconnect();
This will remove all the observed elements from the observer, i.e.

```razor
@using Blazor.IntersectionObserver
@using Ljbc1994.Blazor.IntersectionObserver
@implements IAsyncDisposable
@inject IIntersectionObserverService ObserverService
Expand Down Expand Up @@ -213,7 +213,7 @@ observer.Dispose();
This is a useful method to clean up observers when components are disposed of, i.e.

```razor
@using Blazor.IntersectionObserver
@using Ljbc1994.Blazor.IntersectionObserver
@implements IAsyncDisposable
@inject IIntersectionObserverService ObserverService
Expand Down
64 changes: 0 additions & 64 deletions azure-pipelines.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Blazor.IntersectionObserver\Blazor.IntersectionObserver.csproj" />
<ProjectReference Include="..\..\src\Ljbc1994.Blazor.IntersectionObserver\Ljbc1994.Blazor.IntersectionObserver.csproj">
<GlobalPropertiesToRemove></GlobalPropertiesToRemove>
</ProjectReference>
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions samples/Blazor.IntersectionObserver.Client/Pages/Index.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@page "/"
@using Blazor.IntersectionObserver
@using Blazor.IntersectionObserver.API
@using Blazor.IntersectionObserver.Components
@using Ljbc1994.Blazor.IntersectionObserver
@using Ljbc1994.Blazor.IntersectionObserver.API
@using Ljbc1994.Blazor.IntersectionObserver.Components

<div class="row">
<div class="col-sm-12">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@page "/lazy-images"

@using Blazor.IntersectionObserver.Components
@using Ljbc1994.Blazor.IntersectionObserver.Components

<div class="row">
<div class="col-sm-12">
Expand Down
1 change: 1 addition & 0 deletions samples/Blazor.IntersectionObserver.Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Ljbc1994.Blazor.IntersectionObserver;

namespace Blazor.IntersectionObserver.Client
{
Expand Down
4 changes: 2 additions & 2 deletions samples/Blazor.IntersectionObserver.Client/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
@using Blazor.IntersectionObserver.Client
@using Blazor.IntersectionObserver.Client.Shared

@using Blazor.IntersectionObserver.API
@using Blazor.IntersectionObserver.Components
@using Ljbc1994.Blazor.IntersectionObserver.API
@using Ljbc1994.Blazor.IntersectionObserver.Components
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Blazor.IntersectionObserver\Blazor.IntersectionObserver.csproj" />
<ProjectReference Include="..\..\src\Ljbc1994.Blazor.IntersectionObserver\Ljbc1994.Blazor.IntersectionObserver.csproj">
<GlobalPropertiesToRemove></GlobalPropertiesToRemove>
</ProjectReference>
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions samples/Blazor.IntersectionObserver.Server/Pages/Index.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@page "/"
@using Blazor.IntersectionObserver
@using Blazor.IntersectionObserver.API
@using Blazor.IntersectionObserver.Components
@using Ljbc1994.Blazor.IntersectionObserver
@using Ljbc1994.Blazor.IntersectionObserver.API
@using Ljbc1994.Blazor.IntersectionObserver.Components

<div class="row">
<div class="col-sm-12">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@page "/lazy-images"

@using Blazor.IntersectionObserver.Components
@using Ljbc1994.Blazor.IntersectionObserver.Components

<div class="row">
<div class="col-sm-12">
Expand Down
1 change: 1 addition & 0 deletions samples/Blazor.IntersectionObserver.Server/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Ljbc1994.Blazor.IntersectionObserver;

namespace Blazor.IntersectionObserver.Server
{
Expand Down
4 changes: 2 additions & 2 deletions samples/Blazor.IntersectionObserver.Server/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
@using Blazor.IntersectionObserver.Server
@using Blazor.IntersectionObserver.Server.Shared

@using Blazor.IntersectionObserver.API
@using Blazor.IntersectionObserver.Components
@using Ljbc1994.Blazor.IntersectionObserver.API
@using Ljbc1994.Blazor.IntersectionObserver.Components
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Blazor.IntersectionObserver.API
namespace Ljbc1994.Blazor.IntersectionObserver.API
{
public class DOMRectReadOnlyOptions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Components;

namespace Blazor.IntersectionObserver.API
namespace Ljbc1994.Blazor.IntersectionObserver.API
{
public class ForwardReference
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Blazor.IntersectionObserver.API
namespace Ljbc1994.Blazor.IntersectionObserver.API
{
public class IntersectionObserverEntry
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Blazor.IntersectionObserver.Configuration
namespace Ljbc1994.Blazor.IntersectionObserver.Configuration
{
internal static class Constants
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Blazor.IntersectionObserver.API;
using Ljbc1994.Blazor.IntersectionObserver.API;
using Microsoft.AspNetCore.Components;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Blazor.IntersectionObserver
namespace Ljbc1994.Blazor.IntersectionObserver
{
public interface IIntersectionObserverService
{
Expand Down
Loading

0 comments on commit dac2473

Please sign in to comment.