Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ jobs:
run: |
cd ./apps/react-starter
pnpm exec playwright install chromium --with-deps
- name: Test
run: pnpm test

- name: Test (React)
run: pnpm --filter ix-react-starter test

- name: Test (Angular)
run: pnpm --filter ix-angular-starter test

e2e:
# Depend on build job to ensure the build is completed before running E2E tests
Expand All @@ -64,18 +68,36 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/install

- name: Install Playwright Browsers
# React E2E
- name: Install Playwright Browsers (React)
run: |
cd ./apps/react-starter
pnpm playwright install chromium --with-deps

- name: E2E
run: pnpm e2e
- name: E2E (React)
run: pnpm --filter ix-react-starter e2e

- name: E2E Report
- name: E2E Report (React)
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: react-playwright-report
path: apps/react-starter/playwright-report/
retention-days: 1

# Angular E2E
- name: Install Playwright Browsers (Angular)
run: |
cd ./apps/angular-starter
pnpm playwright install chromium --with-deps

- name: E2E (Angular)
run: pnpm --filter ix-angular-starter e2e

- name: E2E Report (Angular)
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: angular-playwright-report
path: apps/angular-starter/playwright-report/
retention-days: 1
18 changes: 16 additions & 2 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,27 @@ jobs:
BRAND_URL: ${{ vars.BRAND_URL }}

- name: Build React Starter
run: pnpm build
run: pnpm build --filter ix-react-starter
env:
REACT_BASE: /ix-starter/react-starter/
VITE_THEME: 1

- name: Deploy GitHub Pages 🚀
- name: Enable Brand Theme in Angular Starter
run: |
cd ./apps/angular-starter
sed -i "s/BRAND_THEME: false/BRAND_THEME: true/" src/environments/environment.ts

- name: Build Angular Starter
run: pnpm --filter ix-angular-starter run build --base-href /ix-starter/angular-starter/

- name: Deploy React App 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./apps/react-starter/dist
target-folder: react-starter

- name: Deploy Angular App 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./apps/angular-starter/dist/browser
target-folder: angular-starter
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ To develop all apps and packages, run the following command:
pnpm dev --filter ix-react-starter
```


#### Angular

```
pnpm dev --filter ix-angular-starter

## Useful Links

Learn more about the power of Turborepo:
Expand Down
17 changes: 17 additions & 0 deletions apps/angular-starter/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single
ij_typescript_use_double_quotes = false

[*.md]
max_line_length = off
trim_trailing_whitespace = false
49 changes: 49 additions & 0 deletions apps/angular-starter/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db

# Playwright
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
4 changes: 4 additions & 0 deletions apps/angular-starter/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
}
20 changes: 20 additions & 0 deletions apps/angular-starter/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
}
]
}
42 changes: 42 additions & 0 deletions apps/angular-starter/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
},
{
"type": "npm",
"script": "test",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
}
]
}
34 changes: 34 additions & 0 deletions apps/angular-starter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# `@siemens/ix-angular` + Angular + Angular CLI

## A starter template for Angular applications using Siemens Industrial Experience (ix-Angular).

## Install dependencies

Execute pnpm install/npm install

## Development

Execute `pnpm start`

## Build

Execute `pnpm build`
The build artifacts will be stored in the dist/ directory

## Testing

### Unit Tests (Jasmine + Karma)

Execute `pnpm test`

### E2E tests (playwright)

Execute `pnpm e2e`

### Generate Components/Services

pnpm ng generate component [name]

pnpm ng generate service [name]

pnpm ng generate pipe [name]
107 changes: 107 additions & 0 deletions apps/angular-starter/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ixd-angular-starter": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
{
"glob": "**/*",
"input": "public"
},
"src/assets"
],
"styles": ["src/styles.scss"],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "5MB",
"maximumError": "5MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "4kB",
"maximumError": "8kB"
}
],
"outputHashing": "all"
},
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"buildTarget": "ixd-angular-starter:build:production"
},
"development": {
"buildTarget": "ixd-angular-starter:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.config.js",
"inlineStyleLanguage": "scss",
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": ["src/styles.scss"],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
}
}
}
},
"cli": {
"schematicCollections": [
"angular-eslint"
],
"analytics": false
}
}
Loading
Loading