Skip to content

Commit cb10b27

Browse files
authored
feat: expose secondary endpoints for all modules (#156)
Closes #147
1 parent 0e00da6 commit cb10b27

File tree

2,070 files changed

+11298
-7639
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,070 files changed

+11298
-7639
lines changed

.gitignore

+16-4
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ yarn-error.log
3434
testem.log
3535
/typings
3636
docker/browser
37-
angularKeycloakLintReport.json
38-
angularBusinessLintReport.json
39-
angularPublicLintReport.json
37+
*LintReport.json
4038

4139
# System Files
4240
.DS_Store
@@ -51,4 +49,18 @@ yarn.lock
5149

5250
# Markdown
5351
projects/angular-showcase/src/assets/docs
54-
projects/angular-showcase/src/assets/examples
52+
projects/angular-showcase/src/assets/examples
53+
54+
# Copied modules
55+
projects/sbb-esta/angular-business/accordion
56+
projects/sbb-esta/angular-business/autocomplete
57+
projects/sbb-esta/angular-business/datepicker
58+
projects/sbb-esta/angular-business/dropdown
59+
projects/sbb-esta/angular-business/field
60+
projects/sbb-esta/angular-business/input
61+
projects/sbb-esta/angular-business/option
62+
projects/sbb-esta/angular-business/radio-button
63+
projects/sbb-esta/angular-business/select
64+
projects/sbb-esta/angular-business/textarea
65+
projects/sbb-esta/angular-business/time-input
66+
projects/sbb-esta/angular-business/usermenu

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package.json
22
package-lock.json
33
dist
44
angular.json
5+
.github/*
56
.vscode/*
67
projects/**/schematics/*/index.js
78
projects/**/schematics/*/files

.travis.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,18 @@ addons:
99

1010
cache: npm
1111

12+
env:
13+
global:
14+
- NODE_OPTIONS=--max_old_space_size=7168
1215
script:
13-
- npm run build:libs
16+
- if [ "$TRAVIS_TAG" == "" ]; then npm run lint; fi
17+
- npm run build:angular-core
18+
- npm run build:angular-icons
19+
- npm run build:angular-keycloak
20+
- npm run build:angular-business
21+
- npm run build:angular-public
1422
- if [ "$TRAVIS_TAG" == "" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then npm run test; fi
1523
- if [ "$TRAVIS_TAG" == "" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ]; then npm run test:pr; fi
16-
- if [ "$TRAVIS_TAG" == "" ]; then npm run lint; fi
17-
- if [ "$TRAVIS_TAG" == "" ]; then npm run sonar; fi
1824
- npm run build:angular-showcase
1925
- if [ "$TRAVIS_TAG" == "" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ]; then npm run publish:staging; fi
2026
before_deploy:

CONTRIBUTING.md

+23-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ diagnose the problem. Screenshots are also helpful.
1818
You can help the team even more and [submit a Pull Request](#submit-pr) with a fix.
1919

2020

21+
## <a name="feature"></a> Want a Feature?
22+
You can *request* a new feature by [submitting an issue](#submit-issue) to our [GitHub
23+
Repository][github]. If you would like to *implement* a new feature, please submit an issue with
24+
a proposal for your work first, to be sure that we can use it.
25+
Please consider what kind of change it is:
26+
27+
* For a **Major Feature**, first open an issue and outline your proposal so that it can be
28+
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
29+
and help you to craft the change so that it is successfully accepted into the project.
30+
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
31+
32+
2133
### <a name="submit-issue"></a> Submitting an Issue
2234
If your issue appears to be a bug, and hasn't been reported, open a new issue.
2335
Providing the following information will increase the
@@ -50,7 +62,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
5062
* Create your patch, **including appropriate test cases**.
5163
* Follow our [Coding Rules](#rules).
5264
* Test your changes with our supported browsers and screen readers.
53-
* Run tests via `ng test @sbb-esta/angular-public` and ensure that all tests pass.
65+
* Run tests via `ng test @sbb-esta/angular-{library` and ensure that all tests pass.
5466
* Commit your changes using a descriptive commit message that follows our
5567
[commit message conventions](#commit). Adherence to these conventions
5668
is necessary because release notes are automatically generated from these messages.
@@ -68,6 +80,10 @@ Before you submit your Pull Request (PR) consider the following guidelines:
6880

6981
* In GitHub, send a pull request to `sbb-angular:master`.
7082

83+
Note: Our builds often run out of memory. To ensure the build can run, set the NODE_OPTIONS environment variable
84+
to `--max_old_space_size=7168` either locally or globally.
85+
(e.g. in PowerShell, the default VS Code terminal: `$env:NODE_OPTIONS="--max_old_space_size=7168"`)
86+
7187

7288
## <a name="rules"></a> Coding Rules
7389
This project uses [prettier](https://prettier.io/) and [tslint](https://palantir.github.io/tslint/) rules to enforce code style.
@@ -145,9 +161,11 @@ reference GitHub issues that this commit **Closes**.
145161
The rest of the commit message is then used for this.
146162
147163
## <a name="public-business"></a> Public/Business Package
148-
This project publishes three packages:
164+
This project publishes five packages:
149165
166+
* @sbb-esta/angular-core
150167
* @sbb-esta/angular-icons
168+
* @sbb-esta/angular-keycloak
151169
* @sbb-esta/angular-public
152170
* @sbb-esta/angular-business
153171
@@ -166,4 +184,6 @@ padding: 1rem 2rem;
166184
@include businessOnly() {
167185
margin-bottom: 1rem;
168186
}
169-
```
187+
```
188+
189+
For business components in `projects/sbb-esta/angular-business`, it is required to put `$sbbBusiness: true;` at the top of .scss files.

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ It is generated, maintained, tested, linted and built with the [Angular CLI](htt
1313

1414
### [@sbb-esta/angular-icons](https://www.npmjs.com/package/@sbb-esta/angular-icons)
1515

16+
The package containing core functionality shared by `@sbb-esta/angular-public` and `@sbb-esta/angular-business`.
17+
18+
### [@sbb-esta/angular-icons](https://www.npmjs.com/package/@sbb-esta/angular-icons)
19+
1620
The package containing SBB icons as components.
1721

1822
[Icon List](https://angular.app.sbb.ch/latest/icons-list)
@@ -23,12 +27,14 @@ The package containing SBB icons as components.
2327

2428
The package containg the components/modules for public SBB websites.
2529

26-
[Component List](https://angular.app.sbb.ch/latest/components-list)
30+
[Component List](https://angular.app.sbb.ch/latest/public)
2731

2832
### [@sbb-esta/angular-business](https://www.npmjs.com/package/@sbb-esta/angular-business)
2933

3034
The package containg the components/modules for SBB business applications.
3135

36+
[Component List](https://angular.app.sbb.ch/latest/business)
37+
3238
### [@sbb-esta/angular-keycloak](https://www.npmjs.com/package/@sbb-esta/angular-keycloak)
3339

3440
The package containg the authentication module keycloak.

angular.json

+63-24
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
"node_modules/highlight.js/styles/github.css"
3737
],
3838
"scripts": [],
39-
"es5BrowserSupport": true,
40-
"webWorkerTsConfig": "projects/angular-showcase/tsconfig.worker.json"
39+
"es5BrowserSupport": true
4140
},
4241
"configurations": {
4342
"production": {
@@ -120,8 +119,7 @@
120119
"options": {
121120
"tsConfig": [
122121
"projects/angular-showcase/tsconfig.app.json",
123-
"projects/angular-showcase/tsconfig.spec.json",
124-
"projects/angular-showcase/tsconfig.worker.json"
122+
"projects/angular-showcase/tsconfig.spec.json"
125123
],
126124
"exclude": [
127125
"**/node_modules/**"
@@ -160,7 +158,7 @@
160158
},
161159
"@sbb-esta/angular-public": {
162160
"root": "projects/sbb-esta/angular-public",
163-
"sourceRoot": "projects/sbb-esta/angular-public/src",
161+
"sourceRoot": "projects/sbb-esta/angular-public",
164162
"projectType": "library",
165163
"prefix": "sbb",
166164
"schematics": {
@@ -179,14 +177,9 @@
179177
"test": {
180178
"builder": "@angular-devkit/build-angular:karma",
181179
"options": {
182-
"main": "projects/sbb-esta/angular-public/src/test.ts",
180+
"main": "projects/sbb-esta/angular-public/test.ts",
183181
"tsConfig": "projects/sbb-esta/angular-public/tsconfig.spec.json",
184-
"karmaConfig": "projects/sbb-esta/angular-public/karma.conf.js",
185-
"stylePreprocessorOptions": {
186-
"includePaths": [
187-
"projects/sbb-esta/angular-public/src/styles/common"
188-
]
189-
}
182+
"karmaConfig": "projects/sbb-esta/angular-public/karma.conf.js"
190183
},
191184
"configurations": {
192185
"pr": {
@@ -221,7 +214,7 @@
221214
},
222215
"@sbb-esta/angular-business": {
223216
"root": "projects/sbb-esta/angular-business",
224-
"sourceRoot": "projects/sbb-esta/angular-business/src",
217+
"sourceRoot": "projects/sbb-esta/angular-business",
225218
"projectType": "library",
226219
"prefix": "sbb",
227220
"schematics": {
@@ -240,14 +233,9 @@
240233
"test": {
241234
"builder": "@angular-devkit/build-angular:karma",
242235
"options": {
243-
"main": "projects/sbb-esta/angular-business/src/test.ts",
236+
"main": "projects/sbb-esta/angular-business/test.ts",
244237
"tsConfig": "projects/sbb-esta/angular-business/tsconfig.spec.json",
245-
"karmaConfig": "projects/sbb-esta/angular-business/karma.conf.js",
246-
"stylePreprocessorOptions": {
247-
"includePaths": [
248-
"projects/sbb-esta/angular-business/src/styles/common"
249-
]
250-
}
238+
"karmaConfig": "projects/sbb-esta/angular-business/karma.conf.js"
251239
},
252240
"configurations": {
253241
"pr": {
@@ -282,7 +270,7 @@
282270
},
283271
"@sbb-esta/angular-icons": {
284272
"root": "projects/sbb-esta/angular-icons",
285-
"sourceRoot": "projects/sbb-esta/angular-icons/src",
273+
"sourceRoot": "projects/sbb-esta/angular-icons",
286274
"projectType": "library",
287275
"prefix": "sbb",
288276
"schematics": {
@@ -301,7 +289,7 @@
301289
"test": {
302290
"builder": "@angular-devkit/build-angular:karma",
303291
"options": {
304-
"main": "projects/sbb-esta/angular-icons/src/test.ts",
292+
"main": "projects/sbb-esta/angular-icons/test.ts",
305293
"tsConfig": "projects/sbb-esta/angular-icons/tsconfig.spec.json",
306294
"karmaConfig": "projects/sbb-esta/angular-icons/karma.conf.js"
307295
},
@@ -340,7 +328,7 @@
340328
"@sbb-esta/angular-keycloak": {
341329
"projectType": "library",
342330
"root": "projects/sbb-esta/angular-keycloak",
343-
"sourceRoot": "projects/sbb-esta/angular-keycloak/src",
331+
"sourceRoot": "projects/sbb-esta/angular-keycloak",
344332
"prefix": "sbb",
345333
"schematics": {
346334
"@schematics/angular:component": {
@@ -358,7 +346,7 @@
358346
"test": {
359347
"builder": "@angular-devkit/build-angular:karma",
360348
"options": {
361-
"main": "projects/sbb-esta/angular-keycloak/src/test.ts",
349+
"main": "projects/sbb-esta/angular-keycloak/test.ts",
362350
"tsConfig": "projects/sbb-esta/angular-keycloak/tsconfig.spec.json",
363351
"karmaConfig": "projects/sbb-esta/angular-keycloak/karma.conf.js"
364352
},
@@ -392,6 +380,57 @@
392380
}
393381
}
394382
}
383+
},
384+
"@sbb-esta/angular-core": {
385+
"projectType": "library",
386+
"root": "projects/sbb-esta/angular-core",
387+
"sourceRoot": "projects/sbb-esta/angular-core",
388+
"prefix": "sbb",
389+
"architect": {
390+
"build": {
391+
"builder": "@angular-devkit/build-ng-packagr:build",
392+
"options": {
393+
"tsConfig": "projects/sbb-esta/angular-core/tsconfig.lib.json",
394+
"project": "projects/sbb-esta/angular-core/ng-package.json"
395+
}
396+
},
397+
"test": {
398+
"builder": "@angular-devkit/build-angular:karma",
399+
"options": {
400+
"main": "projects/sbb-esta/angular-core/test.ts",
401+
"tsConfig": "projects/sbb-esta/angular-core/tsconfig.spec.json",
402+
"karmaConfig": "projects/sbb-esta/angular-core/karma.conf.js"
403+
},
404+
"configurations": {
405+
"pr": {
406+
"watch": false,
407+
"codeCoverage": true,
408+
"browsers": "ChromeHeadless,FirefoxHeadless",
409+
"sourceMap": false,
410+
"progress": false
411+
},
412+
"ci": {
413+
"watch": false,
414+
"codeCoverage": true,
415+
"browsers": "ChromeHeadless,FirefoxHeadless,BsChrome,BsFirefox",
416+
"sourceMap": false,
417+
"progress": false
418+
}
419+
}
420+
},
421+
"lint": {
422+
"builder": "@angular-devkit/build-angular:tslint",
423+
"options": {
424+
"tsConfig": [
425+
"projects/sbb-esta/angular-core/tsconfig.lib.json",
426+
"projects/sbb-esta/angular-core/tsconfig.spec.json"
427+
],
428+
"exclude": [
429+
"**/node_modules/**"
430+
]
431+
}
432+
}
433+
}
395434
}
396435
},
397436
"defaultProject": "angular-showcase"

browsers.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
"os_version": "10",
1212
"browser": "Firefox"
1313
}
14-
}
14+
}

gulpfile.js

-25
This file was deleted.

0 commit comments

Comments
 (0)