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
1 change: 0 additions & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
12 changes: 4 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
Expand All @@ -23,15 +19,15 @@
"error",
{
"type": "attribute",
"prefix": ["app", "navigation", "login", "logout", "data"],
"prefix": ["app", "authentication", "business", "icon", "layout", "login", "logout", "navigation", "view"],
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": ["app", "navigation", "login", "logout", "data"],
"prefix": ["app", "authentication", "business", "icon", "layout", "login", "logout", "navigation", "view"],
"style": "kebab-case"
}
]
Expand Down
72 changes: 6 additions & 66 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,71 +3,11 @@ name: Testing and validation
on: [push, pull_request]

jobs:

linting:
name: Linting
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 16.x ]

steps:
- name: Check-out
uses: actions/checkout@v2
- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install Angular CLI
run: npm install -g @angular/cli
- name: Run linter
run: npm run lint

test:
name: Tests
needs: linting
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 16.x ]

steps:
- name: Check-out
uses: actions/checkout@v2
- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install Angular CLI
run: npm install -g @angular/cli
- name: Run tests
run: npm test -- --configuration=ci

test_build:
name: Test build
needs: test
runs-on: ubuntu-latest
tests:
name: Tests with node ${{ matrix.node }}
strategy:
matrix:
node: [ 16.x ]

steps:
- name: Check-out
uses: actions/checkout@v2
- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install Angular CLI
run: npm install -g @angular/cli
- name: Build
run: npm run build
node: [ 18 ]
uses: Bernardo-MG/github-workflow-angular/.github/workflows/testing.yml@v1
with:
node: ${{ matrix.node }}
26 changes: 9 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Angular HTTP Basic Authentication Example

Example for setting up HTTP Basic authentication with Angular. It is prepared to be used with [Spring WS Basic Security Example](https://github.com/bernardo-mg/spring-ws-basic-security-example);
Example using HTTP Basic authentication with Angular.

Run the [Spring WS Basic Security Example](https://github.com/bernardo-mg/spring-ws-basic-security-example) for the backend.

## Features

Expand All @@ -9,14 +11,14 @@ Example for setting up HTTP Basic authentication with Angular. It is prepared to

## Usage

### Building the project

This builds the development version:
The project can be deployed locally for testing:

```
npm run build
npm start
```

It will be available on `http://localhost:4200/`. Changes will be reloaded automatically.

### Running tests

To run the unit tests:
Expand All @@ -25,16 +27,6 @@ To run the unit tests:
npm test
```

## Deploying locally

The project can be deployed locally for testing:

```
npm start
```

It will be available on `http://localhost:4200/`. Changes will be reloaded automatically.

## Collaborate

Any kind of help with the project will be well received, and there are two main ways to give such help:
Expand All @@ -54,6 +46,6 @@ If you wish to fork or modify the code, visit the [GitHub project page][scm], wh

The project has been released under the [MIT License][license].

[issues]: https://github.com/Bernardo-MG/dnd5-api-angular-client/issues
[issues]: https://github.com/Bernardo-MG/angular-http-basic-auth-example/issues
[license]: http://www.opensource.org/licenses/mit-license.php
[scm]: https://github.com/Bernardo-MG/dnd5-api-angular-client
[scm]: https://github.com/Bernardo-MG/angular-http-basic-auth-example
24 changes: 12 additions & 12 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@
"outputPath": "dist/angular-http-basic-auth-example",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "sass",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.sass",
"./node_modules/bootstrap/dist/css/bootstrap.min.css"
"./node_modules/bootswatch/dist/materia/bootstrap.min.css"
],
"scripts": [
"./node_modules/@popperjs/core/dist/umd/popper.min.js",
Expand Down Expand Up @@ -96,22 +97,20 @@
"ci": {
"watch": false,
"progress": false,
"browsers": "ChromeHeadlessCI"
"browsers": "ChromeHeadless"
}
},
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"inlineStyleLanguage": "sass",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.sass"
],
"scripts": []
}
},
Expand All @@ -130,6 +129,7 @@
"cli": {
"schematicCollections": [
"@angular-eslint/schematics"
]
],
"analytics": false
}
}
}
50 changes: 0 additions & 50 deletions karma.conf.js

This file was deleted.

Loading