Skip to content

Commit d7e0ea7

Browse files
committed
Revert commt ;)
1 parent 9733e5c commit d7e0ea7

File tree

3 files changed

+140
-2
lines changed

3 files changed

+140
-2
lines changed

README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
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)
14

25
## Prerequisites
36
1. Install [NodeJS](https://nodejs.org/en/)
@@ -179,3 +182,97 @@ You can find the configurations in ```<root>/environment```.
179182
## HTML5 pushState routing
180183
By default pushState, also known as html5 routing, is enabled. The Webpack server is already configured to handle this but many webserver need
181184
extra confuration to enable this.
185+
186+
## Cordova - Mobile Development
187+
188+
### Installation
189+
Initiate cordova with the following commands:
190+
```shell
191+
npm install -g cordova
192+
npm run cordova:init
193+
```
194+
195+
Finally add the following code just before the ```</body>``` closing tag:
196+
```
197+
<!-- Cordova -->
198+
<script src="cordova.js"></script>
199+
```
200+
201+
Cordova has a issue in the way they serve the source code files to the WebView in the platforms. So we have to remove/alter the following code
202+
to make sure everything works in cordova.
203+
204+
Remove the following line in src/index.ejs
205+
```
206+
12: <base href="<%= htmlWebpackPlugin.options.baseUrl %>">
207+
```
208+
209+
Remove the following line in src/app/app.ts
210+
```
211+
8: config.options.pushState = true;
212+
```
213+
214+
Add those lines to the src/styles/_base.scss
215+
```
216+
html {
217+
-ms-touch-action: manipulation;
218+
touch-action: manipulation;
219+
-webkit-user-select: none; /* Chrome all / Safari all */
220+
-moz-user-select: none; /* Firefox all */
221+
-ms-user-select: none; /* IE 10+ */
222+
user-select: none; /* Likely future */
223+
}
224+
```css
225+
226+
Install the following Libraries
227+
```
228+
npm i hammerjs fastclick iscroll --save
229+
```
230+
231+
Install the following Libraries
232+
```
233+
npm i hammerjs fastclick --save
234+
```
235+
236+
Provide those Libraries for the whole app and to do so add this into the config/config-globals.js file.
237+
````
238+
...
239+
new webpack.ProvidePlugin({
240+
'moment': 'moment',
241+
'_': 'lodash',
242+
'Hammer': 'hammerjs',
243+
'FastClick': 'fastclick'
244+
})
245+
...
246+
```
247+
248+
Add this at the bottom of the src/main.ts file to activate FastClick and to prevent default by touchmoves.
249+
```
250+
/**
251+
* Disabels the scroll events from the generel page
252+
*/
253+
document.addEventListener('touchmove', e => e.preventDefault(), false);
254+
255+
/**
256+
* Activates Fastclick
257+
*/
258+
$(() => {
259+
FastClick.attach(document.body);
260+
});
261+
```
262+
263+
264+
### Run and build
265+
Cordova takes the ```www``` folder source to create the Cordova app. This ```www``` folder is a symlink to the ```dist``` folder.
266+
So make sure you run for example ```npm run build``` first before runing/buildinga Cordova app.
267+
268+
###
269+
270+
271+
272+
### Configs
273+
274+
bounce
275+
276+
### Plugins
277+
278+

TODO.ms

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#ToDo's
2+
3+
[X] Add materialize-css
4+
[X] Make materialize-css sass configurable with variables and color plattern
5+
[X] Add google design icons with npm
6+
[X] Add config mgmt
7+
[X] Add logging system
8+
[X] Animation
9+
[X] Layout Wrapper
10+
[X] Remove Bootstrap
11+
[X] Add bootstrap manual to the readme
12+
[X] Add all important libs like moment, lodash ...
13+
[ ] Add custome attribute example
14+
[ ] Add service example
15+
[X] Add cordova
16+
[ ] Add cordova docu and helpers and stuff
17+
[X] Add travis
18+
[ ] Add greenkeeper

package.json

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "aila-prototype-admin",
33
"title": "AILA Proto-Admin",
44
"version": "0.2.3",
5+
"description": "A starter kit for building a standard navigation-style app with Aurelia, typescript and webpack.",
56
"main": "dist/app.js",
67
"scripts": {
78
"test": "cross-env NODE_ENV=test ./node_modules/karma/bin/karma start test/karma.conf.js",
@@ -37,8 +38,30 @@
3738
"webpack-dev-server": "cross-env ./node_modules/.bin/webpack-dev-server",
3839
"cordova:init": "node ./config/init-cordova.js"
3940
},
40-
"author": "gerhard.hirschfeld@swisscom.com",
41-
"homepage": "",
41+
"repository": {
42+
"type": "git",
43+
"url": "git+ssh://git@github.com/w3tecch/aurelia-ts-boilerplate.git"
44+
},
45+
"keywords": [
46+
"aurelia",
47+
"boilterplate",
48+
"typescript",
49+
"webpack"
50+
],
51+
"license": "MIT",
52+
"author": "w3tec <info@w3tec.ch> (http://w3tec.ch/)",
53+
"contributors": [
54+
{
55+
"name": "Gery Hirschfeld <gery.hirschfeld@w3tec.ch> (https://github.com/hirsch88)"
56+
},
57+
{
58+
"name": "David Weber <david.weber@w3tec.ch> (https://github.com/dweber019)"
59+
}
60+
],
61+
"bugs": {
62+
"url": "https://github.com/w3tecch/aurelia-ts-boilerplate/issues"
63+
},
64+
"homepage": "https://github.com/w3tecch/aurelia-ts-boilerplate#readme",
4265
"aurelia": {
4366
"build": {
4467
"resources": [

0 commit comments

Comments
 (0)