Skip to content

Commit 1db60ec

Browse files
committed
Update readme
1 parent 12ba7fe commit 1db60ec

File tree

2 files changed

+64
-4
lines changed

2 files changed

+64
-4
lines changed

README.md

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# aurelia-skeleton-webpack
1+
[![Build Status](https://api.travis-ci.org/w3tecch/aurelia-ts-boilerplate.svg?branch=master)](https://travis-ci.org/w3tecch/aurelia-ts-boilerplate)
2+
[![Dependency Status](https://david-dm.org/w3tecch/aurelia-ts-boilerplate.svg)](https://david-dm.org/w3tecch/aurelia-ts-boilerplate)
3+
[![devDependency Status](https://david-dm.org/w3tecch/aurelia-ts-boilerplate/dev-status.svg)](https://david-dm.org/w3tecch/aurelia-ts-boilerplate#info=devDependencies)
24

35
## Getting started
46

@@ -10,8 +12,13 @@ From the project folder, execute the following commands:
1012
npm install # or: yarn install
1113
```
1214

15+
Don't forget to install the typings:
16+
```shell
17+
npm run install:typings
18+
```
19+
1320
This will install all required dependencies, including a local version of Webpack that is going to
14-
build and bundle the app. There is no need to install Webpack globally.
21+
build and bundle the app. There is no need to install Webpack globally.
1522

1623
To run the app execute the following command:
1724

@@ -44,7 +51,7 @@ To build an optimized, minified production bundle (output to /dist) execute:
4451
npm start -- build
4552
```
4653

47-
To build
54+
To build
4855

4956
To test either the development or production build execute:
5057

@@ -117,3 +124,56 @@ To run all the unit test suites and the E2E tests, you may simply run:
117124
```shell
118125
npm start -- test.all
119126
```
127+
128+
## App confugration
129+
There is an app configuration management in place. Two standart environments are already set (devlopment and production).
130+
You can for example build the production with:
131+
132+
```shell
133+
npm start -- webpack.build.production
134+
```
135+
136+
If you like to add an additional configuaration you have to do the following two steps:
137+
1. Add the configuration json to ```app/config```, example preprod.json
138+
2. Add the corresponding command to ```package-script.js``` and pass the right argument like ```--env.config=preprod```
139+
140+
Example for path ```webpack.build.preprod```:
141+
```javascript
142+
preprod: {
143+
inlineCss: series(
144+
'nps webpack.build.before',
145+
'webpack --progress -p --env.production --env.config=preprod'
146+
),
147+
default: series(
148+
'nps webpack.build.before',
149+
'webpack --progress -p --env.production --env.extractCss --env.config=preprod'
150+
),
151+
serve: series.nps(
152+
'webpack.build.production',
153+
'serve'
154+
),
155+
}
156+
```
157+
158+
## HTML5 pushState routing
159+
By default pushState, also known as html5 routing, is enabled. The Webpack server is already configured to handle this but many webserver need
160+
extra confuration to enable this.
161+
162+
## Cordova - Mobile Development
163+
164+
### Installation
165+
Initiate cordova with the following commands:
166+
```shell
167+
npm install -g cordova
168+
npm start -- mobile.setup
169+
```
170+
171+
### Run and build
172+
Cordova takes the ```www``` folder source to create the Cordova app. This ```www``` folder is a symlink pointing to the ```dist``` folder.
173+
So make sure you run for example ```npm start -- build``` first before runing/building a Cordova app.
174+
175+
Sometimes the ```www``` symlink is removed (e.g. git clone). Run this command to fix this:
176+
```shell
177+
npm start -- mobile.link
178+
```
179+

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ module.exports = ({ production, server, extractCss, coverage, platform, config }
147147
collapseWhitespace: true
148148
} : undefined,
149149
metadata: {
150-
title: pkg.title, server, baseUrl, description: pkg.description, version: pkg.version, author: pkg.author
150+
title: pkg.title, server, baseUrl, description: pkg.description, version: pkg.version, author: pkg.author, platform: PLATFORM, ENV
151151
},
152152
}),
153153
...when(extractCss, new ExtractTextPlugin({

0 commit comments

Comments
 (0)