Skip to content

Commit a010a53

Browse files
committed
Merge branch 'release/7.0.0'
2 parents 7900d04 + 9249478 commit a010a53

24 files changed

+1120
-1931
lines changed

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM nginx:alpine
2+
3+
# Copy app source to work directory
4+
COPY ./dist /usr/share/nginx/html

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,27 @@ Sometimes the ```www``` symlink is removed (e.g. git clone). Run this command to
187187
npm start -- mobile.link
188188
```
189189

190+
## Docker
191+
There is a ```Dockerfile``` unsing the [nginx](https://hub.docker.com/_/nginx/) image to build the docker image.
192+
193+
### Getting started
194+
First build your aurelia app with
195+
```shell
196+
npm start build
197+
```
198+
199+
Then build the image with
200+
```shell
201+
docker build -t nginx-aurelia .
202+
```
203+
204+
Then run a container with
205+
```shell
206+
docker run --name aurelia-app -d -p 8080:80 nginx-aurelia
207+
```
208+
Now your website is available with ```http://localhost:8080```.
209+
210+
If you like to update the source do this
211+
```shell
212+
docker cp ./dist/. mycontainer:/usr/share/nginx/html
213+
```

package-scripts.js

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,11 @@ module.exports = {
55
scripts: {
66
default: 'nps webpack',
77
test: {
8-
default: 'nps test.jest',
9-
jest: {
10-
default: series(
11-
rimraf('test/coverage-jest'),
12-
'jest'
13-
),
14-
watch: 'jest --watch',
15-
},
16-
karma: {
17-
default: series(
18-
rimraf('test/coverage-karma'),
19-
'karma start test/karma.conf.js'
20-
),
21-
watch: 'karma start test/karma.conf.js --auto-watch --no-single-run',
22-
debug: 'karma start test/karma.conf.js --auto-watch --no-single-run --debug'
23-
},
24-
all: concurrent({
25-
browser: series.nps('test.karma', 'e2e'),
26-
jest: 'nps test.jest',
27-
})
8+
default: series(
9+
rimraf('test/coverage-jest'),
10+
'jest'
11+
),
12+
watch: 'jest --watch'
2813
},
2914
e2e: {
3015
default: concurrent({
@@ -56,11 +41,11 @@ module.exports = {
5641
development: {
5742
default: series(
5843
'nps webpack.build.before',
59-
'webpack --progress -d --env.config=development'
44+
'webpack --progress -d --env.extractCss --env.config=development'
6045
),
61-
extractCss: series(
46+
inlineCss: series(
6247
'nps webpack.build.before',
63-
'webpack --progress -d --env.extractCss, --env.config=development'
48+
'webpack --progress -d --env.config=development'
6449
),
6550
serve: series.nps(
6651
'webpack.build.development',
@@ -83,8 +68,8 @@ module.exports = {
8368
}
8469
},
8570
server: {
86-
default: `webpack-dev-server -d --inline --env.server`,
87-
extractCss: `webpack-dev-server -d --inline --env.server --env.extractCss`,
71+
default: `webpack-dev-server -d --inline --env.server --env.extractCss`,
72+
inlineCss: `webpack-dev-server -d --inline --env.server`,
8873
hmr: `webpack-dev-server -d --inline --hot --env.server`
8974
},
9075
},

package.json

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aurelia-typescript-boilerplate",
3-
"version": "6.3.0",
3+
"version": "7.0.0",
44
"title": "Aurelia Typescript Boilerplate",
55
"description": "A starter kit for building a standard navigation-style app with Aurelia and Webpack.",
66
"main": "dist/app.bundle.js",
@@ -94,24 +94,20 @@
9494
"chalk": "^2.1.0",
9595
"compression-webpack-plugin": "^1.0.0",
9696
"copy-webpack-plugin": "^4.0.1",
97-
"cordova": "^7.0.1",
98-
"cross-env": "^5.0.5",
97+
"cordova": "^8.0.0",
9998
"css-loader": "^0.28.7",
10099
"expose-loader": "^0.7.3",
101100
"extract-text-webpack-plugin": "^3.0.0",
102101
"favicons-webpack-plugin": "^0.0.7",
103102
"file-loader": "^1.1.5",
104103
"html-webpack-plugin": "^2.30.1",
105-
"http-server": "^0.10.0",
104+
"http-server": "^0.11.1",
106105
"img-loader": "^2.0.0",
107106
"istanbul-instrumenter-loader": "^3.0.0",
108-
"jasmine-core": "^2.8.0",
109107
"jest": "^20.0.4",
110108
"jest-cli": "^20.0.4",
111109
"json-loader": "^0.5.7",
112-
"karma": "^1.7.1",
113110
"karma-chrome-launcher": "^2.2.0",
114-
"karma-coverage-istanbul-reporter": "^1.3.0",
115111
"karma-jasmine": "^1.1.0",
116112
"karma-mocha-reporter": "^2.2.4",
117113
"karma-webpack": "^2.0.4",
@@ -123,9 +119,9 @@
123119
"postcss-loader": "^2.0.6",
124120
"protractor": "^5.1.2",
125121
"sass-loader": "^6.0.6",
126-
"style-loader": "^0.19.0",
122+
"style-loader": "^0.20.1",
127123
"ts-jest": "^20.0.14",
128-
"ts-node": "^3.3.0",
124+
"ts-node": "^4.1.0",
129125
"tslib": "^1.7.1",
130126
"tslint": "^5.7.0",
131127
"tslint-loader": "^3.5.3",
@@ -137,6 +133,8 @@
137133
"webpack-notifier": "^1.5.0"
138134
},
139135
"dependencies": {
136+
"@fortawesome/fontawesome": "^1.1.3",
137+
"@fortawesome/fontawesome-free-solid": "^5.0.6",
140138
"animate.css": "^3.5.2",
141139
"aurelia-animator-css": "^1.0.2",
142140
"aurelia-bootstrapper": "^2.1.1",
@@ -156,11 +154,12 @@
156154
"aurelia-templating-router": "^1.1.0",
157155
"aurelia-validation": "^1.1.1",
158156
"bluebird": "^3.5.0",
159-
"bootstrap-sass": "^3.3.7",
160-
"font-awesome": "^4.7.0",
157+
"bootstrap": "^4.0.0",
161158
"i18next-browser-languagedetector": "^2.0.0",
162159
"isomorphic-fetch": "^2.2.1",
163160
"jquery": "^3.2.1",
164-
"moment": "^2.18.1"
161+
"moment": "^2.18.1",
162+
"normalize.css": "^7.0.0",
163+
"popper.js": "^1.12.9"
165164
}
166165
}

src/app/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ import de_CHTranslation from './../locales/de_CH.json';
2828
import 'isomorphic-fetch';
2929
import LanguageDetector from 'i18next-browser-languagedetector';
3030

31+
// Fontawesome setup
32+
import fontawesome from '@fortawesome/fontawesome';
33+
import fontawesomeSolid from '@fortawesome/fontawesome-free-solid';
34+
fontawesome.library.add(fontawesomeSolid);
35+
3136
import * as Bluebird from 'bluebird';
3237
// remove out if you don't want a Promise polyfill (remove also from webpack.config.js)
3338
Bluebird.config({ warnings: { wForgottenReturn: false } });
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
<template>
2-
<section class="au-animate">
2+
<div class="container-fluid au-animate">
33
<h2>${heading}</h2>
4-
<div>
5-
<div class="col-md-2">
6-
<ul class="well nav nav-pills nav-stacked">
7-
<li repeat.for="row of router.navigation" class="${row.isActive ? 'active' : ''}">
8-
<a href.bind="row.href">${row.title}</a>
9-
</li>
10-
</ul>
4+
<div class="row">
5+
<div class="col-md-3">
6+
<div class="card">
7+
<div class="card-body">
8+
<div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
9+
<a repeat.for="row of router.navigation"
10+
class="nav-link ${row.isActive ? 'active' : ''}"
11+
href.bind="row.href">${ row.title }</a>
12+
</div>
13+
</div>
14+
</div>
1115
</div>
12-
<div class="col-md-10" style="padding: 0">
16+
<div class="col-md-9" style="padding: 0">
1317
<router-view></router-view>
1418
</div>
1519
</div>
16-
</section>
20+
</div>
1721
</template>

src/app/modules/users/users.vm.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
<template>
2-
<section class="au-animate">
2+
<div class="container-fluid au-animate">
33
<h2>${heading}</h2>
44
<div class="row au-stagger">
5-
<div class="col-sm-6 col-md-3 card-container au-animate" repeat.for="user of users">
6-
<div class="card">
7-
<div class="avatar">
8-
<img src.bind="user.getAvatarUrl()" crossorigin ref="image"/>
9-
</div>
10-
<div class="content">
11-
<p class="name">${user.getLogin()}</p>
12-
<p><a target="_blank" class="btn btn-default" href.bind="user.getHtmlUrl()">Contact</a></p>
5+
<div class="col-sm-6 col-md-3 au-animate" repeat.for="user of users">
6+
7+
<div class="card mb-4">
8+
<img class="card-img-top" src.bind="user.getAvatarUrl()" crossorigin ref="image">
9+
<div class="card-body">
10+
<h5 class="card-title">${user.getLogin()}</h5>
11+
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
12+
<a href.bind="user.getHtmlUrl()" target="_blank" class="btn btn-primary">Contact</a>
1313
</div>
1414
</div>
15+
1516
</div>
1617
</div>
17-
</section>
18+
</div>
1819
</template>

src/app/modules/welcome/welcome.vm.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<section class="au-animate">
2+
<div class="container-fluid au-animate">
33
<h1 t="TITLE"></h1>
44
<h2>${heading}</h2>
55
<form role="form" submit.delegate="submit()">
@@ -15,7 +15,7 @@ <h2>${heading}</h2>
1515
<label>Full Name</label>
1616
<p class="help-block">${fullName | upper}</p>
1717
</div>
18-
<button type="submit" class="btn btn-default">Submit</button>
18+
<button type="submit" class="btn btn-primary">Submit</button>
1919
</form>
2020

2121
<show-name some-text.bind="firstName"></show-name>
@@ -42,5 +42,5 @@ <h3>Validation</h3>
4242

4343
<h3>Dialog</h3>
4444
<button click.delegate="openDialog()" class="btn btn-primary">open dialog</button>
45-
</section>
45+
</div>
4646
</template>
Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,22 @@
11
<template bindable="router">
2-
require("./nav-bar.scss");
3-
4-
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
5-
<div class="navbar-header">
6-
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#skeleton-navigation-navbar-collapse">
7-
<span class="sr-only">Toggle Navigation</span>
8-
<span class="icon-bar"></span>
9-
<span class="icon-bar"></span>
10-
<span class="icon-bar"></span>
11-
</button>
12-
<a class="navbar-brand" href="#">
13-
<i class="fa fa-home"></i>
14-
<span>${router.title}</span>
15-
</a>
16-
</div>
17-
18-
<div class="collapse navbar-collapse" id="skeleton-navigation-navbar-collapse">
19-
<ul class="nav navbar-nav">
20-
<li repeat.for="row of router.navigation" class="${row.isActive ? 'active' : ''}">
21-
<a data-toggle="collapse" data-target="#skeleton-navigation-navbar-collapse.in" href.bind="row.href">${row.title}</a>
22-
</li>
23-
</ul>
24-
25-
<ul class="nav navbar-nav navbar-right">
26-
<li class="loader" if.bind="router.isNavigating">
27-
<i class="fa fa-spinner fa-spin fa-2x"></i>
2+
<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
3+
<a class="navbar-brand" href="#">
4+
<i class="fa fa-home"></i>
5+
<span>${ router.title }</span>
6+
</a>
7+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false"
8+
aria-label="Toggle navigation">
9+
<span class="navbar-toggler-icon"></span>
10+
</button>
11+
<div class="collapse navbar-collapse" id="navbarNav">
12+
<ul class="navbar-nav">
13+
<li repeat.for="row of router.navigation" class="nav-item ${row.isActive ? 'active' : ''}">
14+
<a class="nav-link" href.bind="row.href">${ row.title }</a>
2815
</li>
2916
</ul>
3017
</div>
18+
<span class="navbar-text" if.bind="router.isNavigating">
19+
<i class="fa fa-spinner fa-spin"></i>
20+
</span>
3121
</nav>
3222
</template>

src/app/resources/templates/nav-bar/nav-bar.scss

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)