Skip to content

Commit

Permalink
Merge pull request #135 from nongrata081/fix/minor-fixes
Browse files Browse the repository at this point in the history
docs(readme): update docs with instructions for app start
  • Loading branch information
nongrata081 authored Jul 4, 2019
2 parents 659af09 + 07bbc5e commit 70e3a42
Show file tree
Hide file tree
Showing 10 changed files with 129 additions and 50 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# NgAssessment

# Prerequisites

To start the app required are:

- [email protected]
- [email protected]

## Start app

Run `npm start` to start the application. This will start:

- fake rest api server at http://localhost:3000
- angular app at http://localhost:4200

## Guidelines for monorepo

[Enterprise angular monorepo patterns](enterprise-angular-mono-repo-patterns.pdf)
Expand Down
111 changes: 111 additions & 0 deletions a11y/pa11y-test-report.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="utf-8"/>
<title>Accessibility Report For "http://localhost:4200/" (Tue Jul 02 2019 21:07:45 GMT+0200 (Central European Summer Time))</title>

<style>

html, body {
margin: 0;
padding: 0;
background-color: #fff;
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
line-height: 22px;
color: #333;
}
li {
margin-bottom: 15px;
}
h1, h2, p, pre, ul {
margin-top: 0;
margin-bottom: 0;
}
h1 {
margin-bottom: 10px;
font-size: 24px;
line-height: 24px;
}
h2 {
font-size: 16px;
}
pre {
white-space: pre-wrap;
overflow: auto;
}

.page {
max-width: 800px;
margin: 0 auto;
padding: 25px;
}

.counts {
margin-top: 30px;
font-size: 20px;
}
.count {
display: inline-block;
padding: 5px;
border-radius: 5px;
border: 1px solid #eee;
}

.clean-list {
margin-left: 0;
padding-left: 0;
list-style: none;
}
.results-list {
margin-top: 30px;
}

.result {
padding: 10px;
border-radius: 5px;
border: 1px solid #eee;
}
.error {
background-color: #fdd;
border-color: #ff9696;
}
.warning {
background-color: #ffd;
border-color: #e7c12b;
}
.notice {
background-color: #eef4ff;
border-color: #b6d0ff;
}

</style>

</head>
<body>

<div class="page">

<h1>Accessibility Report For "http://localhost:4200/"</h1>
<p>Generated at: Tue Jul 02 2019 21:07:45 GMT+0200 (Central European Summer Time)</p>

<p class="counts">
<span class="count error">1 errors</span>
<span class="count warning">0 warnings</span>
<span class="count notice">0 notices</span>
</p>

<ul class="clean-list results-list">
<li class="result error">
<h2>Error: Img element missing an alt attribute. Use the alt attribute to specify a short text alternative.</h2>
<p>WCAG2AA.Principle1.Guideline1_1.1_1_1.H37</p>
<pre>&lt;img _ngcontent-serverapp-c0=&quot;&quot; src=&quot;&quot;&gt; (select with "html &gt; body &gt; ship-root &gt; img")</pre>
</li>
</ul>

</div>

</body>
</html>

Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,7 @@
</div>

<div>
<button
mat-raised-button
style="margin-right:20px"
(click)="addPackage()"
[disabled]="disableAddingPackage()"
>
<button mat-raised-button (click)="addPackage()" [disabled]="disableAddingPackage()">
Add package
</button>
<button
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
button {
outline: none;
margin-right: 20px;
}

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions libs/ui-components/src/lib/ui-components.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SharedUiComponentExampleComponent } from './components/shared-ui-component-example/shared-ui-component-example.component';
import { HeaderComponent } from './components/header/header.component';
import { MDBBootstrapModule } from 'angular-bootstrap-md';
import { FooterComponent } from './components/footer/footer.component';
Expand All @@ -21,14 +20,12 @@ import { HttpClientModule } from '@angular/common/http';
],
declarations: [
HeaderComponent,
SharedUiComponentExampleComponent,
FooterComponent,
ShipmentFormComponent,
PackageFormComponent
],
exports: [
HeaderComponent,
SharedUiComponentExampleComponent,
FooterComponent,
ShipmentFormComponent,
PackageFormComponent
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"backstop:test:ci": "./node_modules/backstopjs/cli/index.js test",
"backstop:approve": "yarn backstop approve",
"backstop:open:latest": "yarn backstop openReport",
"a11y:test": "./node_modules/pa11y/bin/pa11y.js --reporter html http://localhost:4000/ > a11y/pa11y-test-report.html",
"a11y:test": "./node_modules/pa11y/bin/pa11y.js --reporter html http://localhost:4200/ > a11y/pa11y-test-report.html",
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Custom app scripts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~": "",
"fake:rest:api": "./node_modules/json-server/lib/cli/bin.js --watch fake-rest-api/endpoints.json",
"shipping:hmr": "ng serve shipping --configuration hmr",
Expand All @@ -38,7 +38,7 @@
"test:coverage": "ng test --code-coverage",
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NX ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~": "",
"ng": "ng",
"start": "ng serve --o",
"start": "npm run fake:rest:api & ng serve --o",
"build": "ng build",
"test": "ng test --passWithNoTests",
"lint": "nx lint && ng lint",
Expand Down

0 comments on commit 70e3a42

Please sign in to comment.