Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit b5a6060

Browse files
authored
Merge branch 'master' into shake-dat-tree
2 parents c404ca0 + 3744b3e commit b5a6060

File tree

7 files changed

+37
-7
lines changed

7 files changed

+37
-7
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
<a name="1.0.1"></a>
2+
## [1.0.1](https://github.com/driftyco/ionic-app-scripts/compare/v1.0.0...v1.0.1) (2017-02-07)
3+
4+
### Breaking Changes
5+
6+
This release was accidentally published with a breaking change for Deep Links. If you're using Deep Links, please don't upgrade to this version. We are in the process of changing the DeepLinks API slightly.
7+
8+
### Bug Fixes
9+
10+
* **angular:** support angular 2.3+ ngc api ([13e930a](https://github.com/driftyco/ionic-app-scripts/commit/13e930a))
11+
* **deep-linking:** works when there isn't a valid deep link config ([62f05fc](https://github.com/driftyco/ionic-app-scripts/commit/62f05fc))
12+
* **deep-links:** adjust paths for AoT ([4055d73](https://github.com/driftyco/ionic-app-scripts/commit/4055d73))
13+
* **sass:** output valid source maps, that chrome can parse ([#306](https://github.com/driftyco/ionic-app-scripts/issues/306)) ([6589550](https://github.com/driftyco/ionic-app-scripts/commit/6589550))
14+
* **source-maps:** always generate source map, then purge them if not needed in postprocess step ([d26b44c](https://github.com/driftyco/ionic-app-scripts/commit/d26b44c))
15+
16+
17+
### Features
18+
19+
* **createWorker:** pass argv and config_argv to spawned processes ([#487](https://github.com/driftyco/ionic-app-scripts/issues/487)) ([02dfff8](https://github.com/driftyco/ionic-app-scripts/commit/02dfff8))
20+
* **lint:** new option to have stand alone lint bail ([b3bb906](https://github.com/driftyco/ionic-app-scripts/commit/b3bb906))
21+
22+
23+
124
<a name="1.0.0"></a>
225
# [1.0.0](https://github.com/driftyco/ionic-app-scripts/compare/v0.0.48...v1.0.0) (2017-01-06)
326

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ These tasks are available within `ionic-app-scripts` and can be added to npm scr
176176
| `copy` | Run the copy tasks, which by defaults copies the `src/assets/` and `src/index.html` files to `www`. |
177177
| `lint` | Run the linter against the source `.ts` files, using the `tslint.json` config file at the root. |
178178
| `minify` | Minifies the output JS bundle and compresses the compiled CSS. |
179-
| `sass` | Sass compilation of used modules. Bundling must have as least ran once before Sass compilation. |
179+
| `sass` | Sass compilation of used modules. Bundling must have at least ran once before Sass compilation. |
180180
| `watch` | Runs watch for dev builds. |
181181

182182
Example NPM Script:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ionic/app-scripts",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Scripts for Ionic Projects",
55
"homepage": "http://ionicframework.com/",
66
"author": "Ionic Team <[email protected]> (http://ionic.io)",

src/dev-server/serve-config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as path from 'path';
33
export interface ServeConfig {
44
httpPort: number;
55
host: string;
6+
hostBaseUrl: string;
67
rootDir: string;
78
wwwDir: string;
89
buildDir: string;
@@ -21,4 +22,4 @@ export const LOGGER_DIR = '__ion-dev-server';
2122
export const IONIC_LAB_URL = '/ionic-lab';
2223

2324
export const IOS_PLATFORM_PATH = path.join('platforms', 'ios', 'www');
24-
export const ANDROID_PLATFORM_PATH = path.join('platforms', 'android', 'assets', 'www');
25+
export const ANDROID_PLATFORM_PATH = path.join('platforms', 'android', 'assets', 'www');

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export { lint } from './lint';
77
export { minify } from './minify';
88
export { ngc } from './ngc';
99
export { sass, sassUpdate } from './sass';
10+
export { serve } from './serve';
1011
export { transpile } from './transpile';
1112
export { uglifyjs } from './uglifyjs';
1213
export { watch, buildUpdate } from './watch';

src/serve.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ describe('test serve', () => {
2222
};
2323
configResults = {
2424
httpPort: 8100,
25+
hostBaseUrl: 'http://localhost:8100',
2526
host: '0.0.0.0',
2627
rootDir: '/',
2728
wwwDir: '/www',
@@ -89,6 +90,7 @@ describe('test serve', () => {
8990
config.addArgv('--address');
9091
config.addArgv('127.0.0.1');
9192
configResults.host = '127.0.0.1';
93+
configResults.hostBaseUrl = 'http://127.0.0.1:8101';
9294
config.addArgv('--livereload-port');
9395
config.addArgv('35729');
9496
configResults.liveReloadPort = 35729;

src/serve.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@ export function serve(context: BuildContext) {
2525

2626
return findClosestOpenPort(host, notificationPort)
2727
.then((notificationPortFound) => {
28+
const hostPort = getHttpServerPort(context);
29+
const hostLocation = (host === '0.0.0.0') ? 'localhost' : host;
2830

2931
config = {
30-
httpPort: getHttpServerPort(context),
32+
httpPort: hostPort,
3133
host: host,
34+
hostBaseUrl: `http://${hostLocation}:${hostPort}`,
3235
rootDir: context.rootDir,
3336
wwwDir: context.wwwDir,
3437
buildDir: context.buildDir,
@@ -52,6 +55,7 @@ export function serve(context: BuildContext) {
5255
})
5356
.then(() => {
5457
onReady(config, context);
58+
return config;
5559
}, (err: BuildError) => {
5660
throw err;
5761
})
@@ -65,16 +69,15 @@ export function serve(context: BuildContext) {
6569
}
6670

6771
function onReady(config: ServeConfig, context: BuildContext) {
68-
const host = config.host === '0.0.0.0' ? 'localhost' : config.host;
6972
if (config.launchBrowser || config.launchLab) {
70-
const openOptions: string[] = [`http://${host}:${config.httpPort}`]
73+
const openOptions: string[] = [config.hostBaseUrl]
7174
.concat(launchLab(context) ? [IONIC_LAB_URL] : [])
7275
.concat(browserOption(context) ? [browserOption(context)] : [])
7376
.concat(platformOption(context) ? ['?ionicplatform=', platformOption(context)] : []);
7477

7578
open(openOptions.join(''), browserToLaunch(context));
7679
}
77-
Logger.info(`dev server running: http://${host}:${config.httpPort}/`, 'green', true);
80+
Logger.info(`dev server running: ${config.hostBaseUrl}/`, 'green', true);
7881
Logger.newLine();
7982
}
8083

0 commit comments

Comments
 (0)