Skip to content

Commit

Permalink
chore: update dev-server ports (#2146)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschuerch authored Oct 31, 2023
1 parent b535192 commit b06dc60
Show file tree
Hide file tree
Showing 20 changed files with 172 additions and 151 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: pnpm --filter design-system-documentation... build

- name: Cypress info
run: pnpm --filter internet-header exec cypress info
run: pnpm --filter design-system-documentation exec cypress info

- name: Run tests
run: pnpm exec start-server-and-test 'http-server packages/documentation/storybook-static --silent --port 9300' 9300 'pnpm --filter "...[origin/main]" --workspace-concurrency=1 e2e'
run: pnpm exec start-server-and-test 'http-server packages/documentation/storybook-static --silent --port 9001' 9001 'pnpm --filter "...[origin/main]" --workspace-concurrency=1 e2e'
40 changes: 21 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Other root scripts are available for convenience:
Use these commands whenever you want to work on one of these packages. Ideally, these commands start a watcher for file changes and a GUI where you can see what changed for all relevant packages. The start scripts always assume that you previously ran `pnpm bootstrap` and therefore have all packages built on disk.

| Command | Description |
|-----------------------------------|----------------------------------------------------------------------------------------------|
| --------------------------------- | -------------------------------------------------------------------------------------------- |
| `pnpm start` or `pnpm docs:start` | starts the design-system-documentation storybook and the `start` scripts of all dependencies |
| `pnpm demo:start` | starts the demo Angular application and the `start` scripts of all dependencies |
| `pnpm intranet-header:start` | starts the intranet header demo application |
Expand All @@ -48,7 +48,7 @@ Use these commands whenever you want to work on one of these packages. Ideally,
For easy test runs, the following commands are available (not all packages might have all commands available).

| Command | Description |
|---------------------------------------|-------------------------------------------------------------------------------------------|
| ------------------------------------- | ----------------------------------------------------------------------------------------- |
| `pnpm test` | runs the `test` command for all packages recursively |
| `pnpm [package shortname]:test` | runs unit and end-to-end tests for the package in headless mode |
| `pnpm [package shortname]:unit` | runs unit tests for the package |
Expand Down Expand Up @@ -181,28 +181,30 @@ As per resolution of the [discussion about sass variables vs. CSS custom propert

For some packages it's necessary to run multiple dev servers at the same time. To prevent port conflicts, the following ranges are given to each package. The ranges 9000 - 9400 are chosen for compatibility with [port ranges used by Browserstack](https://www.browserstack.com/question/39572).

### Default DevServer: 9000-9099
### Documentation DevServer: 9000-9099

| Package | Port |
|:---------------|-----:|
| Demo | 9000 |
| IntranetHeader | 9001 |
| Package | Port |
| :----------------- | ---: |
| Storybook | 9000 |
| Storybook Headless | 9001 |
| Demo | 9010 |

### Storybook DevServers: 9200-9299
### Components DevServer: 9200-9299

| Package | Port |
|:--------------|-----:|
| Documentation | 9200 |
| Styles | 9201 |
| Components | 9203 |
| Package | Port |
| :------------------------ | ---: |
| Components | 9200 |
| Components-Angular | 9210 |
| Components-React (unused) | 9220 |

### Storybook TestServers: 9300-9399
### Other Packages DevServers: 9300-9399

| Package | Port |
|:--------------|-----:|
| Documentation | 9300 |
| Styles | 9301 |
| Components | 9303 |
| Package | Port |
| :-------------- | ---: |
| Styles (unused) | 9300 |
| Internet-Header | 9310 |
| Intranet-Header | 9320 |
| Icons | 9330 |

## Branching

Expand Down
41 changes: 30 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
"start": "pnpm docs:start",
"test": "pnpm -r test",
"unit": "pnpm -r unit",
"e2e": "start-server-and-test docs:headless 9300 'pnpm -r --parallel e2e'",
"snapshots": "start-server-and-test 'pnpm docs:headless' 9300 'pnpm --filter design-system-documentation snapshots'",
"e2e": "start-server-and-test docs:headless 9001 'pnpm -r --stream e2e'",
"snapshots": "start-server-and-test 'pnpm docs:headless' 9001 'pnpm --filter design-system-documentation snapshots'",
"demo:start": "pnpm --filter design-system-demo... --parallel --stream start",
"docs:start": "pnpm --filter design-system-documentation... --parallel --stream start",
"docs:build": "pnpm --filter design-system-documentation build",
"docs:headless": "pnpm --filter design-system-documentation start:headless",
"docs:test": "pnpm --filter design-system-documentation test",
"docs:e2e": "start-server-and-test docs:headless 9300 'pnpm --filter design-system-documentation e2e'",
"docs:e2e:watch": "start-server-and-test docs:headless 9300 'pnpm --filter design-system-documentation e2e:watch'",
"docs:e2e": "start-server-and-test docs:headless 9001 'pnpm --filter design-system-documentation e2e'",
"docs:e2e:watch": "start-server-and-test docs:headless 9001 'pnpm --filter design-system-documentation e2e:watch'",
"styles:start": "pnpm --filter design-system-styles start",
"styles:build": "pnpm --filter design-system-styles build",
"styles:test": "pnpm --filter design-system-styles test",
Expand All @@ -33,18 +33,20 @@
"components:test": "pnpm --filter design-system-components test",
"components:unit": "pnpm --filter design-system-components unit",
"components:unit:watch": "pnpm --filter design-system-components unit:watch",
"components:e2e": "start-server-and-test docs:headless 9300 'pnpm --filter design-system-components e2e'",
"components:e2e:watch": "start-server-and-test docs:headless 9300 'pnpm --filter design-system-components e2e:watch'",
"components:snapshots": "start-server-and-test docs:headless 9300 'pnpm --filter design-system-components snapshots'",
"intranet-header:start": "pnpm --filter design-system-intranet-header-workspace start",
"components:e2e": "start-server-and-test docs:headless 9001 'pnpm --filter design-system-components e2e'",
"components:e2e:watch": "start-server-and-test docs:headless 9001 'pnpm --filter design-system-components e2e:watch'",
"components:snapshots": "start-server-and-test docs:headless 9001 'pnpm --filter design-system-components snapshots'",
"components-angular:start": "pnpm --filter design-system-components-angular-workspace start",
"components-angular:build": "pnpm --filter design-system-components-angular-workspace build",
"header:start": "pnpm --filter internet-header dev",
"header:build": "pnpm --filter internet-header build",
"header:test": "pnpm --filter internet-header test",
"header:unit": "pnpm --filter internet-header unit",
"header:unit:watch": "pnpm --filter internet-header unit:watch",
"header:e2e": "start-server-and-test docs:headless 9300 'pnpm --filter internet-header e2e'",
"header:e2e:watch": "start-server-and-test docs:headless 9300 'pnpm --filter internet-header e2e:watch'",
"header:snapshots": "start-server-and-test docs:headless 9300 'pnpm --filter internet-header snapshots'",
"header:e2e": "start-server-and-test docs:headless 9001 'pnpm --filter internet-header e2e'",
"header:e2e:watch": "start-server-and-test docs:headless 9001 'pnpm --filter internet-header e2e:watch'",
"header:snapshots": "start-server-and-test docs:headless 9001 'pnpm --filter internet-header snapshots'",
"intranet-header:start": "pnpm --filter design-system-intranet-header-workspace start",
"icons:start": "pnpm --filter design-system-icons dev",
"icons:test": "pnpm --filter design-system-icons test",
"icons:unit": "pnpm --filter design-system-icons test",
Expand Down Expand Up @@ -75,6 +77,23 @@
"react-dom": ">=18",
"stylelint": ">=15"
}
},
"overrides": {
"[email protected] ≤ Version ≤ 1.3.5": "",
"merge@< 2.1.1": "2.1.1",
"glob-parent@< 5.1.2": "5.1.2",
"[email protected]": "",
"jsbn@≤ 1.1.0": "",
"[email protected]": "",
"semver@< 5.7.2||6.0.0 ≤ Version < 6.3.1||7.0.0 ≤ Version < 7.5.2": "5.7.2||6.3.1||7.5.2",
"@babel/traverse@< 7.23.2||8.0.0-alpha.0 ≤ Version < 8.0.0-alpha.4": "7.23.2||8.0.0-alpha.4",
"merge@<2.1.1": ">=2.1.1",
"glob-parent@<5.1.2": ">=5.1.2",
"socket.io-parser@>=4.0.4 <4.2.3": ">=4.2.3",
"semver@<5.7.2": ">=5.7.2",
"semver@>=7.0.0 <7.5.2": ">=7.5.2",
"postcss@<8.4.31": ">=8.4.31",
"@babel/traverse@<7.23.2": ">=7.23.2"
}
}
}
2 changes: 1 addition & 1 deletion packages/components/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { defineConfig } = require('cypress');

module.exports = defineConfig({
e2e: {
baseUrl: 'http://localhost:9300',
baseUrl: 'http://localhost:9001',
specPattern: ['cypress/e2e/**/*.cy.{ts,tsx}'],
includeShadowDom: true,
viewportWidth: 1024,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"linkDirectory": true
},
"scripts": {
"dev": "stencil build --serve --watch --docs-readme",
"dev": "stencil build --serve --port 9200 --watch --docs-readme",
"start": "stencil build --watch --docs-readme",
"build": "stencil build --docs-readme",
"clean": "rimraf www dist loader",
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ These contribution guidelines extend the [general contribution guidelines](../..
npm start
```

The default URL is [`http://localhost:9000/`](http://localhost:9000/). The app will automatically reload if you change any of the source files.
The default URL is [`http://localhost:9010/`](http://localhost:9010/). The app will automatically reload if you change any of the source files.

## Code scaffolding

Expand Down
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"private": true,
"scripts": {
"clean": "rimraf dist",
"start": "ng serve --port 9000",
"start": "ng serve --port 9010",
"build": "ng build",
"lint": "ng lint"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { defineConfig } = require('cypress');

module.exports = defineConfig({
e2e: {
baseUrl: 'http://localhost:9300',
baseUrl: 'http://localhost:9001',
specPattern: ['cypress/e2e/**/*.cy.{ts,tsx}'],
includeShadowDom: true,
viewportWidth: 1024,
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/cypress.snapshot.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { defineConfig } = require('cypress');
module.exports = defineConfig({
projectId: 'f9aegu',
e2e: {
baseUrl: 'http://localhost:9300',
baseUrl: 'http://localhost:9001',
specPattern: ['cypress/**/*.snapshot.{ts,tsx}'],
includeShadowDom: true,
viewportWidth: 1024,
Expand Down
4 changes: 2 additions & 2 deletions packages/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"private": true,
"scripts": {
"prebuild:managerui": "sass --update --load-path=node_modules .storybook/styles/manager.scss public/manager/ui.css",
"start": "pnpm clean & pnpm prebuild:managerui --style=expanded & storybook dev -p 9200 --quiet --docs",
"start:headless": "pnpm clean & pnpm prebuild:managerui --style=expanded & storybook dev -p 9300 --quiet --no-open --docs",
"start": "pnpm clean & pnpm prebuild:managerui --style=expanded & storybook dev -p 9000 --quiet --docs",
"start:headless": "pnpm clean & pnpm prebuild:managerui --style=expanded & storybook dev -p 9001 --quiet --no-open --docs",
"build": "pnpm clean & pnpm prebuild:managerui --style=compressed --no-source-map & storybook build --quiet --docs",
"clean": "rimraf storybook-static public/manager",
"e2e": "cypress run",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
},
"search": {
"isSearchHidden": false,
"searchPageUrl": "http://localhost:9300/de/pages/suche",
"searchPageUrl": "http://localhost:9001/de/pages/suche",
"redirectPattern": "^[A-Za-z0-9.]{11,23}$",
"searchBoxSuggestionsThreshold": "0",
"searchBoxSuggestionsAllNumber": "0",
Expand Down
2 changes: 1 addition & 1 deletion packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
"private": false,
"scripts": {
"dev": "http-server ./public -o -a localhost -p 9005",
"dev": "http-server ./public -o -a localhost -p 9330",
"fetchSVGs": "ts-node src/index.ts",
"test": "jest",
"test:watch": "jest --watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/internet-header/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { defineConfig } = require('cypress');

module.exports = defineConfig({
e2e: {
baseUrl: 'http://localhost:9300',
baseUrl: 'http://localhost:9001',
specPattern: ['cypress/e2e/**/*.cy.{ts,tsx}'],
includeShadowDom: true,
viewportWidth: 1024,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
},
"search": {
"isSearchHidden": false,
"searchPageUrl": "http://localhost:9300/de/pages/suche",
"searchPageUrl": "http://localhost:9001/de/pages/suche",
"redirectPattern": "^[A-Za-z0-9.]{11,23}$",
"searchBoxSuggestionsThreshold": "0",
"searchBoxSuggestionsAllNumber": "0",
Expand Down
2 changes: 1 addition & 1 deletion packages/internet-header/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"loader/"
],
"scripts": {
"dev": "stencil build --serve --watch --docs-readme",
"dev": "stencil build --serve --port 9310 --watch --docs-readme",
"start": "stencil build --watch --docs-readme",
"build": "stencil build --docs-readme",
"clean": "rimraf www dist loader",
Expand Down
1 change: 1 addition & 0 deletions packages/intranet-header-workspace/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ npm-debug.log
yarn-error.log

# IDEs and editors
.vscode/
.idea/
.project
.classpath
Expand Down
6 changes: 3 additions & 3 deletions packages/intranet-header-workspace/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Angular Components
# Intranet-Header-Workspace

This is the wrapper package for any Angular related components in the Design System. This package itself is not published anywhere.

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.5.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli).

## Setup

These guidelines extend the [general contribution guidelines](../../CONTRIBUTING.md).

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:9001/`. The app will automatically reload if you change any of the source files.
Run `npm run start` for a dev server. Navigate to `http://localhost:9320/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Expand Down
2 changes: 1 addition & 1 deletion packages/intranet-header-workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"scripts": {
"clean": "rimraf dist",
"start": "ng serve --port 9001",
"start": "ng serve --port 9320",
"build": "ng build intranet-header",
"lint": "ng lint"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { defineConfig } = require('cypress');

module.exports = defineConfig({
e2e: {
baseUrl: 'http://localhost:9300',
baseUrl: 'http://localhost:9001',
specPattern: ['cypress/e2e/**/*.cy.{ts,tsx}'],
includeShadowDom: true,
viewportWidth: 1024,
Expand Down
Loading

0 comments on commit b06dc60

Please sign in to comment.