Skip to content

Commit 5b910fc

Browse files
committed
feat(button): npm at solution level
1 parent 9806216 commit 5b910fc

File tree

5 files changed

+48
-27
lines changed

5 files changed

+48
-27
lines changed

.github/workflows/dev.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ jobs:
180180
node-version: '20'
181181

182182
- name: Install npm packages so we have gulp for retrieving TEL Frontend Css
183-
working-directory: ./TELBlazor.Components
183+
# working-directory: ./TELBlazor.Components
184184
run: npm ci
185185
#CI is an install that adheres to package-lock
186186

@@ -212,6 +212,7 @@ jobs:
212212
DEV_TELBLAZOR_PACKAGE_VERSION: ${{ needs.generate-dev-semantic-version.outputs.dev-package-version }}
213213

214214
steps:
215+
215216
- name: Checkout Code
216217
uses: actions/checkout@v4
217218

@@ -265,6 +266,13 @@ jobs:
265266
echo "Listing packages.lock.json files:"
266267
find . -name "packages.lock.json" -type f -print
267268
269+
- name: Set up Node.js so we have gulp for retrieving TEL Frontend Css
270+
uses: actions/setup-node@v4
271+
with:
272+
node-version: '20'
273+
274+
- name: Install npm packages so we have gulp for retrieving TEL Frontend Css
275+
run: npm ci
268276

269277

270278
- name: Publish WasmStaticClient

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
node-version: '20'
133133

134134
- name: Install npm packages so we have gulp for retrieving TEL Frontend Css
135-
working-directory: ./TELBlazor.Components
135+
# working-directory: ./TELBlazor.Components
136136
run: npm ci
137137
#CI is an install with adhering to package-lock
138138

.github/workflows/reuseable-ci-checks.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
status: ${{ job.status }}
5656
steps:
5757

58+
5859
- name: Checkout code
5960
uses: actions/checkout@v3
6061

@@ -95,7 +96,7 @@ jobs:
9596
node-version: '20'
9697

9798
- name: Install npm packages so we have gulp for retrieving TEL Frontend Css
98-
working-directory: ./TELBlazor.Components
99+
# working-directory: ./TELBlazor.Components
99100
run: npm ci
100101

101102
- name: Build and create package locally
@@ -212,7 +213,7 @@ jobs:
212213
node-version: '20'
213214

214215
- name: Install npm packages so we have gulp for retrieving TEL Frontend Css
215-
working-directory: ./TELBlazor.Components
216+
# working-directory: ./TELBlazor.Components
216217
run: npm ci
217218

218219
- name: Install ReportGenerator

TELBlazor.Components.ShowCase.Shared/Layouts/MainLayout.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
<div class="nhsuk-header__container">
66
<div class="nhsuk-header__logo">
7-
<a class="nhsuk-header__link nhsuk-header__link--service " href="/" aria-label="NHS digital service manual homepage">
7+
<div class="nhsuk-header__link nhsuk-header__link--service " >
88
<svg class="nhsuk-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 16" height="40" width="100">
99
<path class="nhsuk-logo__background" fill="#005eb8" d="M0 0h40v16H0z"></path>
1010
<path class="nhsuk-logo__text" fill="#fff" d="M3.9 1.5h4.4l2.6 9h.1l1.8-9h3.3l-2.8 13H9l-2.7-9h-.1l-1.8 9H1.1M17.3 1.5h3.6l-1 4.9h4L25 1.5h3.5l-2.7 13h-3.5l1.1-5.6h-4.1l-1.2 5.6h-3.4M37.7 4.4c-.7-.3-1.6-.6-2.9-.6-1.4 0-2.5.2-2.5 1.3 0 1.8 5.1 1.2 5.1 5.1 0 3.6-3.3 4.5-6.4 4.5-1.3 0-2.9-.3-4-.7l.8-2.7c.7.4 2.1.7 3.2.7s2.8-.2 2.8-1.5c0-2.1-5.1-1.3-5.1-5 0-3.4 2.9-4.4 5.8-4.4 1.6 0 3.1.2 4 .6"></path>
1111
</svg>
1212
<span class="nhsuk-header__service-name">
1313
TELBlazor
1414
</span>
15-
</a>
15+
</div>
1616
</div>
1717
<div class="nhsuk-header__content" id="content-header">
1818

TELBlazor.Components/Core/DI/DI.cs

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,41 +24,53 @@ public static class DI
2424
/// <param name="services"></param>
2525
/// <param name="IsClient">client in some occassions will have different scoping</param>
2626
/// <returns></returns>
27-
public static IServiceCollection AddTELBlazorComponentServices(this IServiceCollection services,
27+
public static IServiceCollection AddTELBlazorComponentServices(this IServiceCollection services,
2828
bool IsClient,
2929
ITELBlazorBaseComponentConfiguration TELBlazorBaseComponentConfiguration
3030
)
3131
{
3232

3333

34-
//// Register only if not already registered
35-
//if (!services.Any(sd => sd.ServiceType == typeof(ITELBlazorBaseComponentConfiguration)))
36-
//{
3734

38-
if (IsClient)
35+
36+
if (IsClient)
3937
{
40-
services.AddSingleton<ITELBlazorBaseComponentConfiguration>(sp =>{return TELBlazorBaseComponentConfiguration;});
38+
services.AddSingleton<ITELBlazorBaseComponentConfiguration>(sp => { return TELBlazorBaseComponentConfiguration; });
4139

42-
//services.AddSingleton<ITELBlazorBaseComponentConfiguration>(sp =>
43-
//{
44-
// return new TELBlazorBaseComponentConfiguration
45-
// {
46-
// JSEnabled = true, //if we are inject the client then it is true
47-
// HostType = $"{builder.Configuration["Properties:Environment"]} {builder.Configuration["Properties:Application"]}"
48-
// };
49-
//});
5040
}
51-
else
41+
else
5242
{
5343
services.AddScoped<ITELBlazorBaseComponentConfiguration>(sp => { return TELBlazorBaseComponentConfiguration; });
5444
}
5545

56-
//Add Services
57-
//qqqq not uing this yet, services.AddBlazoredLocalStorage();
58-
//qqqq come back and refactor client a service to use this
59-
// qqqq if the controllers already have the service then this would require another to be added and then there would be two the later overides the former but seems innefficient
60-
// we may require a service thats never used if the consuming project doesnt use it, so it seems it would be useful for lh but actually thats it, or we make them optional.
61-
return services;
46+
//Add Services
47+
//qqqq not uing this yet, services.AddBlazoredLocalStorage();
48+
//qqqq come back and refactor client a service to use this
49+
// qqqq if the controllers already have the service then this would require another to be added and then there would be two the later overides the former but seems innefficient
50+
// we may require a service thats never used if the consuming project doesnt use it, so it seems it would be useful for lh but actually thats it, or we make them optional.
51+
return services;
6252
}
53+
54+
55+
//private static IServiceCollection TryAddSingletonIfNotRegistered<TService>(
56+
//this IServiceCollection services,
57+
//TService instance)
58+
//{
59+
// if (!services.Any(sd => sd.ServiceType == typeof(TService)))
60+
// {
61+
// services.AddSingleton<instance>(instance);
62+
// }
63+
// return services;
64+
//}
65+
//private static IServiceCollection TryAddScopedIfNotRegistered<TService>(
66+
//this IServiceCollection services,
67+
//TService instance)
68+
//{
69+
// if (!services.Any(sd => sd.ServiceType == typeof(TService)))
70+
// {
71+
// services.AddScoped<instance>(instance);
72+
// }
73+
// return services;
74+
//}
6375
}
6476
}

0 commit comments

Comments
 (0)