Skip to content

Commit db84d7d

Browse files
committed
chore: 🤖 bring back transformer
1 parent 58bf87d commit db84d7d

File tree

10 files changed

+16866
-29816
lines changed

10 files changed

+16866
-29816
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
target: ['ci:build', 'ci:test', 'ci:lint', 'ci:e2e', 'build docs']
14+
target: ['ci:build', 'ci:test', 'ci:lint', 'ci:e2e']
1515
runs-on: ubuntu-latest
1616
name: ${{ matrix.target }}
1717
steps:

.github/workflows/deploy-demo-app.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Simple workflow for deploying static content to GitHub Pages
2-
name: Deploy static content to Pages
2+
name: Deploy playground to Pages
33

44
on:
55
# Runs on pushes targeting the default branch
@@ -34,19 +34,19 @@ jobs:
3434

3535
- name: Setup
3636
uses: ./.github/actions/step-setup
37-
37+
3838
- name: Setup Pages
3939
uses: actions/configure-pages@v5
4040

4141
- name: Build playground
4242
run: npm run build:playground
43-
43+
4444
- name: Upload artifact
4545
uses: actions/upload-pages-artifact@v3
4646
with:
4747
# Upload entire repository
4848
path: 'dist/apps/transloco-playground'
49-
49+
5050
- name: Deploy to GitHub Pages
5151
id: deployment
5252
uses: actions/deploy-pages@v4
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Target } from '@angular-devkit/architect';
2+
import * as cheerio from 'cheerio';
3+
4+
export default (targetOptions: Target, indexHtml: string) => {
5+
const $ = cheerio.load(indexHtml);
6+
$('base').attr('href', process.env.ORIGIN + '/transloco/');
7+
8+
return $.html();
9+
};

apps/transloco-playground/project.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
],
3737
"outputHashing": "all"
3838
},
39+
"docs": {
40+
"indexHtmlTransformer": "apps/transloco-playground/index-html-transform.ts",
41+
"outputHashing": "all"
42+
},
3943
"development": {
4044
"buildOptimizer": false,
4145
"optimization": false,

apps/transloco-playground/src/app/app.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { environment } from '../environments/environment';
1616
})
1717
export class AppComponent {
1818
private destroyRef = inject(DestroyRef);
19-
isDocs = environment.isDocs;
2019
service = inject(TranslocoService);
2120
availableLangs = this.service.getAvailableLangs() as LangDefinition[];
2221

apps/transloco-playground/src/app/home/home.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { environment } from '../../environments/environment';
1313
imports: [TranslocoModule],
1414
})
1515
export class HomeComponent {
16-
isDocs = environment.isDocs;
1716
dynamic = '🦄';
1817
key = 'home';
1918

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export const environment = {
22
production: true,
33
baseUrl: '',
4-
isDocs: false,
54
};

apps/transloco-playground/src/environments/environment.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
export const environment = {
66
production: false,
77
baseUrl: '',
8-
isDocs: false,
98
};
109

1110
/*

0 commit comments

Comments
 (0)