Skip to content

Commit

Permalink
feat: expose secondary endpoints for all modules (#156)
Browse files Browse the repository at this point in the history
Closes #147
  • Loading branch information
kyubisation authored Sep 7, 2019
1 parent 0e00da6 commit cb10b27
Show file tree
Hide file tree
Showing 2,070 changed files with 11,298 additions and 7,639 deletions.
20 changes: 16 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ yarn-error.log
testem.log
/typings
docker/browser
angularKeycloakLintReport.json
angularBusinessLintReport.json
angularPublicLintReport.json
*LintReport.json

# System Files
.DS_Store
Expand All @@ -51,4 +49,18 @@ yarn.lock

# Markdown
projects/angular-showcase/src/assets/docs
projects/angular-showcase/src/assets/examples
projects/angular-showcase/src/assets/examples

# Copied modules
projects/sbb-esta/angular-business/accordion
projects/sbb-esta/angular-business/autocomplete
projects/sbb-esta/angular-business/datepicker
projects/sbb-esta/angular-business/dropdown
projects/sbb-esta/angular-business/field
projects/sbb-esta/angular-business/input
projects/sbb-esta/angular-business/option
projects/sbb-esta/angular-business/radio-button
projects/sbb-esta/angular-business/select
projects/sbb-esta/angular-business/textarea
projects/sbb-esta/angular-business/time-input
projects/sbb-esta/angular-business/usermenu
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package.json
package-lock.json
dist
angular.json
.github/*
.vscode/*
projects/**/schematics/*/index.js
projects/**/schematics/*/files
Expand Down
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@ addons:

cache: npm

env:
global:
- NODE_OPTIONS=--max_old_space_size=7168
script:
- npm run build:libs
- if [ "$TRAVIS_TAG" == "" ]; then npm run lint; fi
- npm run build:angular-core
- npm run build:angular-icons
- npm run build:angular-keycloak
- npm run build:angular-business
- npm run build:angular-public
- if [ "$TRAVIS_TAG" == "" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then npm run test; fi
- if [ "$TRAVIS_TAG" == "" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ]; then npm run test:pr; fi
- if [ "$TRAVIS_TAG" == "" ]; then npm run lint; fi
- if [ "$TRAVIS_TAG" == "" ]; then npm run sonar; fi
- npm run build:angular-showcase
- if [ "$TRAVIS_TAG" == "" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ]; then npm run publish:staging; fi
before_deploy:
Expand Down
26 changes: 23 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ diagnose the problem. Screenshots are also helpful.
You can help the team even more and [submit a Pull Request](#submit-pr) with a fix.


## <a name="feature"></a> Want a Feature?
You can *request* a new feature by [submitting an issue](#submit-issue) to our [GitHub
Repository][github]. If you would like to *implement* a new feature, please submit an issue with
a proposal for your work first, to be sure that we can use it.
Please consider what kind of change it is:

* For a **Major Feature**, first open an issue and outline your proposal so that it can be
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
and help you to craft the change so that it is successfully accepted into the project.
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).


### <a name="submit-issue"></a> Submitting an Issue
If your issue appears to be a bug, and hasn't been reported, open a new issue.
Providing the following information will increase the
Expand Down Expand Up @@ -50,7 +62,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
* Create your patch, **including appropriate test cases**.
* Follow our [Coding Rules](#rules).
* Test your changes with our supported browsers and screen readers.
* Run tests via `ng test @sbb-esta/angular-public` and ensure that all tests pass.
* Run tests via `ng test @sbb-esta/angular-{library` and ensure that all tests pass.
* Commit your changes using a descriptive commit message that follows our
[commit message conventions](#commit). Adherence to these conventions
is necessary because release notes are automatically generated from these messages.
Expand All @@ -68,6 +80,10 @@ Before you submit your Pull Request (PR) consider the following guidelines:

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

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


## <a name="rules"></a> Coding Rules
This project uses [prettier](https://prettier.io/) and [tslint](https://palantir.github.io/tslint/) rules to enforce code style.
Expand Down Expand Up @@ -145,9 +161,11 @@ reference GitHub issues that this commit **Closes**.
The rest of the commit message is then used for this.
## <a name="public-business"></a> Public/Business Package
This project publishes three packages:
This project publishes five packages:
* @sbb-esta/angular-core
* @sbb-esta/angular-icons
* @sbb-esta/angular-keycloak
* @sbb-esta/angular-public
* @sbb-esta/angular-business
Expand All @@ -166,4 +184,6 @@ padding: 1rem 2rem;
@include businessOnly() {
margin-bottom: 1rem;
}
```
```
For business components in `projects/sbb-esta/angular-business`, it is required to put `$sbbBusiness: true;` at the top of .scss files.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ It is generated, maintained, tested, linted and built with the [Angular CLI](htt

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

The package containing core functionality shared by `@sbb-esta/angular-public` and `@sbb-esta/angular-business`.

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

The package containing SBB icons as components.

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

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

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

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

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

[Component List](https://angular.app.sbb.ch/latest/business)

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

The package containg the authentication module keycloak.
Expand Down
87 changes: 63 additions & 24 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
"node_modules/highlight.js/styles/github.css"
],
"scripts": [],
"es5BrowserSupport": true,
"webWorkerTsConfig": "projects/angular-showcase/tsconfig.worker.json"
"es5BrowserSupport": true
},
"configurations": {
"production": {
Expand Down Expand Up @@ -120,8 +119,7 @@
"options": {
"tsConfig": [
"projects/angular-showcase/tsconfig.app.json",
"projects/angular-showcase/tsconfig.spec.json",
"projects/angular-showcase/tsconfig.worker.json"
"projects/angular-showcase/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
Expand Down Expand Up @@ -160,7 +158,7 @@
},
"@sbb-esta/angular-public": {
"root": "projects/sbb-esta/angular-public",
"sourceRoot": "projects/sbb-esta/angular-public/src",
"sourceRoot": "projects/sbb-esta/angular-public",
"projectType": "library",
"prefix": "sbb",
"schematics": {
Expand All @@ -179,14 +177,9 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/sbb-esta/angular-public/src/test.ts",
"main": "projects/sbb-esta/angular-public/test.ts",
"tsConfig": "projects/sbb-esta/angular-public/tsconfig.spec.json",
"karmaConfig": "projects/sbb-esta/angular-public/karma.conf.js",
"stylePreprocessorOptions": {
"includePaths": [
"projects/sbb-esta/angular-public/src/styles/common"
]
}
"karmaConfig": "projects/sbb-esta/angular-public/karma.conf.js"
},
"configurations": {
"pr": {
Expand Down Expand Up @@ -221,7 +214,7 @@
},
"@sbb-esta/angular-business": {
"root": "projects/sbb-esta/angular-business",
"sourceRoot": "projects/sbb-esta/angular-business/src",
"sourceRoot": "projects/sbb-esta/angular-business",
"projectType": "library",
"prefix": "sbb",
"schematics": {
Expand All @@ -240,14 +233,9 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/sbb-esta/angular-business/src/test.ts",
"main": "projects/sbb-esta/angular-business/test.ts",
"tsConfig": "projects/sbb-esta/angular-business/tsconfig.spec.json",
"karmaConfig": "projects/sbb-esta/angular-business/karma.conf.js",
"stylePreprocessorOptions": {
"includePaths": [
"projects/sbb-esta/angular-business/src/styles/common"
]
}
"karmaConfig": "projects/sbb-esta/angular-business/karma.conf.js"
},
"configurations": {
"pr": {
Expand Down Expand Up @@ -282,7 +270,7 @@
},
"@sbb-esta/angular-icons": {
"root": "projects/sbb-esta/angular-icons",
"sourceRoot": "projects/sbb-esta/angular-icons/src",
"sourceRoot": "projects/sbb-esta/angular-icons",
"projectType": "library",
"prefix": "sbb",
"schematics": {
Expand All @@ -301,7 +289,7 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/sbb-esta/angular-icons/src/test.ts",
"main": "projects/sbb-esta/angular-icons/test.ts",
"tsConfig": "projects/sbb-esta/angular-icons/tsconfig.spec.json",
"karmaConfig": "projects/sbb-esta/angular-icons/karma.conf.js"
},
Expand Down Expand Up @@ -340,7 +328,7 @@
"@sbb-esta/angular-keycloak": {
"projectType": "library",
"root": "projects/sbb-esta/angular-keycloak",
"sourceRoot": "projects/sbb-esta/angular-keycloak/src",
"sourceRoot": "projects/sbb-esta/angular-keycloak",
"prefix": "sbb",
"schematics": {
"@schematics/angular:component": {
Expand All @@ -358,7 +346,7 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/sbb-esta/angular-keycloak/src/test.ts",
"main": "projects/sbb-esta/angular-keycloak/test.ts",
"tsConfig": "projects/sbb-esta/angular-keycloak/tsconfig.spec.json",
"karmaConfig": "projects/sbb-esta/angular-keycloak/karma.conf.js"
},
Expand Down Expand Up @@ -392,6 +380,57 @@
}
}
}
},
"@sbb-esta/angular-core": {
"projectType": "library",
"root": "projects/sbb-esta/angular-core",
"sourceRoot": "projects/sbb-esta/angular-core",
"prefix": "sbb",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/sbb-esta/angular-core/tsconfig.lib.json",
"project": "projects/sbb-esta/angular-core/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/sbb-esta/angular-core/test.ts",
"tsConfig": "projects/sbb-esta/angular-core/tsconfig.spec.json",
"karmaConfig": "projects/sbb-esta/angular-core/karma.conf.js"
},
"configurations": {
"pr": {
"watch": false,
"codeCoverage": true,
"browsers": "ChromeHeadless,FirefoxHeadless",
"sourceMap": false,
"progress": false
},
"ci": {
"watch": false,
"codeCoverage": true,
"browsers": "ChromeHeadless,FirefoxHeadless,BsChrome,BsFirefox",
"sourceMap": false,
"progress": false
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/sbb-esta/angular-core/tsconfig.lib.json",
"projects/sbb-esta/angular-core/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "angular-showcase"
Expand Down
2 changes: 1 addition & 1 deletion browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
"os_version": "10",
"browser": "Firefox"
}
}
}
25 changes: 0 additions & 25 deletions gulpfile.js

This file was deleted.

Loading

0 comments on commit cb10b27

Please sign in to comment.