Skip to content

Commit 464b5ef

Browse files
committed
Merge branch 'release/3.0.1'
2 parents 9d033f3 + 7784f30 commit 464b5ef

File tree

5 files changed

+27
-13
lines changed

5 files changed

+27
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Thumbs.db
2929
# Cordova #
3030
cordova/plugins
3131
cordova/platforms
32+
cordova/www
3233
www/
3334
plugins/
3435
platforms/

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,13 @@ npm run mobile:setup
170170
```
171171

172172
### Run and build
173-
Cordova takes the ```www``` folder source to create the Cordova app. This ```www``` folder is a symlink to the ```dist``` folder.
174-
So make sure you run for example ```npm run build``` first before runing/buildinga Cordova app.
173+
Cordova takes the ```www``` folder source to create the Cordova app. This ```www``` folder is a symlink pointing to the ```dist``` folder.
174+
So make sure you run for example ```npm run build``` first before runing/building a Cordova app.
175+
176+
Sometimes the ```www``` symlink is removed (e.g. git clone). Run this command to fix this:
177+
``shell
178+
npm run mobile:link
179+
```
175180
176181
### Typedocs
177182
Typedoc is generated with command ```npm run build:docs``` into directoy ```docs``` and can be served with ```npm run server:docs```.

config/link-mobile.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const rimraf = require('rimraf');
2+
const fs = require('fs');
3+
const path = require('path');
4+
5+
// const cordovaTemp = path.join(process.cwd(), 'cordova');
6+
const root = path.join(process.cwd());
7+
8+
// Remove cordovas www folder
9+
rimraf(`${root}/cordova/www`, (error) => {
10+
if (error) throw error;
11+
12+
// Create symlink www to point to dist
13+
fs.symlink(`${root}/dist`, `${root}/cordova/www`, 'dir', (error) => {
14+
if (error) throw error;
15+
});
16+
});

config/setup-mobile.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,4 @@ const cmd = `cordova create cordova ${pkg.identifier} "${pkg.title}"`;
1212
// Run command to create cordova in a temporary directory
1313
exec(cmd, (error) => {
1414
if (error) throw error;
15-
16-
// Remove cordovas www folder
17-
rimraf(`${root}/cordova/www`, (error) => {
18-
if (error) throw error;
19-
20-
// Create symlink www to point to dist
21-
fs.symlink(`${root}/dist`, `${root}/cordova/www`, 'dir', (error) => {
22-
if (error) throw error;
23-
});
24-
});
2515
});

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "aurelia-ts-boilerplate",
33
"title": "Aurelia TS Boilerplate",
4-
"version": "3.0.0",
4+
"version": "3.0.1",
55
"description": "A starter kit for building a standard navigation-style app with Aurelia, typescript and webpack.",
66
"main": "dist/app.js",
77
"scripts": {
@@ -38,6 +38,8 @@
3838
"webpack-dev-server": "cross-env TS_NODE_PROJECT=tsconfig.tsnode.json TS_NODE_FAST=true ./node_modules/.bin/webpack-dev-server",
3939
"server:coverage": "http-server ./test/coverage --cors",
4040
"mobile:setup": "node ./config/setup-mobile.js",
41+
"postmobile:setup": "npm run mobile:link",
42+
"mobile:link": "node ./config/link-mobile.js",
4143
"mobile:build": "npm run build:dev -- --env.platform mobile",
4244
"mobile:release": "npm run build:prod -- --env.platform mobile"
4345
},

0 commit comments

Comments
 (0)