Verified Commit ef33a3d8 authored by Raphael Ochsenbein's avatar Raphael Ochsenbein
Browse files

added ci and dependencies

parent a82560e5
Pipeline #634 passed with stages
in 1 minute and 40 seconds
# Documentation
# https://docs.gitlab.com/ee/ci/yaml/
stages:
- test
- deploy
test:
stage: test
before_script:
- git submodule sync --recursive
- git submodule update --init --recursive
- nvm i
- npm i
script:
- npm run lint
- npm run test -- --no-watch --progress=false --code-coverage --browsers ChromeHeadless
- npm run build
artifacts:
paths:
- dist/openid-connect-playground/
expire_in: 1337 mins
deploy_master:
stage: deploy
before_script:
# - nvm i
# - npm i
script:
# - npm run production
- rsync --delete -rlvvzhe ssh $CI_PROJECT_DIR/dist/openid-connect-playground/ akehir@192.168.7.111:/app/web/projects/openid/master/ # syncronize from build server to local via rsync
only:
- master
deploy_develop:
stage: deploy
before_script:
# - nvm i
# - npm i
script:
# - npm run production
- rsync --delete -rlvvzhe ssh $CI_PROJECT_DIR/dist/openid-connect-playground/ akehir@192.168.7.111:/app/web/projects/openid/develop/ # syncronize from build server to local via rsync
only:
- develop
11.10.0
# File Options
files:
include:
- 'src/**/*.s+(a|c)ss'
ignore:
- 'node_modules/**/*.*'
# use the default settings to keep this file small
options:
merge-default-rules: true
rules:
# BEM all the things
class-name-format:
- 1
- convention: hyphenatedbem
placeholder-name-format:
- 1
- convention: hyphenatedbem
# sassception! allow a maximum nesting depth of 4 levels deep
nesting-depth:
- 1
- max-depth: 4
# those mixins do not have to be used before any other declarations
mixins-before-declarations:
- 1
- exclude: [ 'mediaquery', 'breakpoint', 'attention', 'nojsonly', 'jsonly', 'focus-onkeypress' ]
# allow non-leading zero values like .2rem or .4rem
leading-zero: 0
# do not sort properties by name
property-sort-order: 0
# allow stuff like 1/2 or 1/4
space-around-operator: 0
# allow warnings for better sass-maps debugging
no-warn: 0
# allow !important but use with care!
no-important: 0
# allow extending from normal classes, this helps a lot with contentcol
# but be careful when extending from nested classes (which should not
# happen all to often with BEM
placeholder-in-extend: 0
# allow id-selectors. shame: remove this after all legacy code is gone
no-ids: 0
# allow custom vendor specific properties
no-misspelled-properties:
- 1
-
'extra-properties':
- 'overflow-scrolling'
- 'font-smooting'
# allow non-standard prefixes for font-smoothing etc.
no-vendor-prefixes:
- 1
-
'ignore-non-standard': 1
# allow nested attribute and pseudo-selectors, this makes stuff
# more readable for humans and allow some edge-case-nesting issues,
# but still force element nesting, so the nesting-depth-rule makes sense
force-pseudo-nesting: 0
force-attribute-nesting: 0
This diff is collapsed.
......@@ -6,7 +6,8 @@
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"lint": "ng lint && npm run lint:sass",
"lint:sass": "sass-lint -c .sass-lint.yml -v -q",
"e2e": "ng e2e"
},
"private": true,
......@@ -19,7 +20,14 @@
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/router": "~7.2.0",
"@ngrx/effects": "^7.2.0",
"@ngrx/router-store": "^7.2.0",
"@ngrx/store": "^7.2.0",
"carbon-components": "^9.78.0",
"carbon-components-angular": "^2.34.0",
"core-js": "^2.5.4",
"ng-oidc-client": "^1.0.5",
"oidc-client": "^1.6.1",
"rxjs": "~6.3.3",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
......@@ -29,9 +37,9 @@
"@angular/cli": "~7.3.1",
"@angular/compiler-cli": "~7.2.0",
"@angular/language-service": "~7.2.0",
"@types/node": "~8.9.4",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
......@@ -41,6 +49,7 @@
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"sass-lint": "^1.12.1",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.2.2"
......
......@@ -2,13 +2,45 @@ import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import {ActionReducerMap, StoreModule} from '@ngrx/store';
import {Log, WebStorageStateStore} from 'oidc-client';
import {EffectsModule} from '@ngrx/effects';
import {NgOidcClientModule} from 'ng-oidc-client';
import {routerReducer, RouterReducerState} from '@ngrx/router-store';
export interface State {
router: RouterReducerState;
}
export const rootStore: ActionReducerMap<State> = {
router: routerReducer
};
@NgModule({
declarations: [
AppComponent
AppComponent,
],
imports: [
BrowserModule
BrowserModule,
StoreModule.forRoot(rootStore),
EffectsModule.forRoot([]),
NgOidcClientModule.forRoot({
oidc_config: {
authority: 'https://localhost:5001',
client_id: 'ng-oidc-client-identity',
redirect_uri: 'http://localhost:4200/callback.html',
response_type: 'id_token token',
scope: 'openid profile offline_access api1',
post_logout_redirect_uri: 'http://localhost:4200/signout-callback.html',
silent_redirect_uri: 'http://localhost:4200/renew-callback.html',
accessTokenExpiringNotificationTime: 10,
automaticSilentRenew: true,
userStore: new WebStorageStateStore({store: window.localStorage})
},
log: {
logger: console,
level: Log.NONE
},
}),
],
providers: [],
bootstrap: [AppComponent]
......
/* You can add global styles to this file, and also import other style files */
$font-path: '~carbon-components/src/globals/fonts';
@import "~carbon-components/scss/globals/scss/styles.scss";
body {
background: #1d1d1d;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment