@ionic/cli-plugin-ionic-angular
Advanced tools
Comparing version
@@ -6,2 +6,13 @@ # Change Log | ||
<a name="1.4.1"></a> | ||
## [1.4.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-plugin-ionic-angular@1.4.0...@ionic/cli-plugin-ionic-angular@1.4.1) (2017-08-03) | ||
### Bug Fixes | ||
* **serve:** allow binding of localhost ([e8a74d0](https://github.com/ionic-team/ionic-cli/commit/e8a74d0)) | ||
<a name="1.4.0"></a> | ||
@@ -8,0 +19,0 @@ # [1.4.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-plugin-ionic-angular@1.3.2...@ionic/cli-plugin-ionic-angular@1.4.0) (2017-07-27) |
@@ -29,3 +29,12 @@ "use strict"; | ||
const [type, name] = args.inputs; | ||
const commandOptions = args.options; | ||
const commandOptions = { | ||
module: false, | ||
constants: false, | ||
}; | ||
if (args.options['module']) { | ||
commandOptions.module = true; | ||
} | ||
if (args.options['constants']) { | ||
commandOptions.constants = true; | ||
} | ||
switch (type) { | ||
@@ -32,0 +41,0 @@ case 'page': |
@@ -11,3 +11,3 @@ "use strict"; | ||
exports.name = '@ionic/cli-plugin-ionic-angular'; | ||
exports.version = '1.5.0-alpha.34095a41'; | ||
exports.version = '1.5.0-alpha.35fa3b5c'; | ||
function getIonicAngularVersion(env) { | ||
@@ -14,0 +14,0 @@ return tslib_1.__awaiter(this, void 0, void 0, function* () { |
@@ -9,4 +9,6 @@ "use strict"; | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
let chosenIP = 'localhost'; | ||
if (args.options.externalIpRequired) { | ||
const address = args.options['address'] || '0.0.0.0'; | ||
const locallyAccessible = ['0.0.0.0', 'localhost', '127.0.0.1'].includes(address); | ||
let externalIP = address; | ||
if (address === '0.0.0.0') { | ||
const availableIPs = cli_utils_1.getAvailableIPAddress(); | ||
@@ -17,6 +19,6 @@ if (availableIPs.length === 0) { | ||
} | ||
chosenIP = (availableIPs.length === 0) ? '0.0.0.0' : availableIPs[0].address; | ||
externalIP = availableIPs[0].address; | ||
if (availableIPs.length > 1) { | ||
if (availableIPs.find(({ address }) => address === args.options.address)) { | ||
chosenIP = args.options.address; | ||
externalIP = args.options.address; | ||
} | ||
@@ -33,3 +35,3 @@ else { | ||
}); | ||
chosenIP = promptedIp; | ||
externalIP = promptedIp; | ||
} | ||
@@ -52,9 +54,11 @@ } | ||
const localAddress = 'http://localhost:' + settings.httpPort; | ||
const externalAddress = 'http://' + chosenIP + ':' + settings.httpPort; | ||
const externalAddress = 'http://' + externalIP + ':' + settings.httpPort; | ||
const externallyAccessible = localAddress !== externalAddress; | ||
args.env.log.info(`Development server running\n` + | ||
`Local: ${chalk.bold(localAddress)}\n` + | ||
(localAddress !== externalAddress ? `External: ${chalk.bold(externalAddress)}` : '')); | ||
return Object.assign({ publicIp: chosenIP, protocol: 'http', localAddress: 'localhost', externalAddress: chosenIP, port: settings.httpPort }, settings); | ||
(locallyAccessible ? `Local: ${chalk.bold(localAddress)}\n` : '') + | ||
(externallyAccessible ? `External: ${chalk.bold(externalAddress)}` : '')); | ||
return Object.assign({ publicIp: externalIP, protocol: 'http', localAddress: 'localhost', externalAddress: externalIP, port: settings.httpPort, locallyAccessible, | ||
externallyAccessible }, settings); | ||
}); | ||
} | ||
exports.serve = serve; |
{ | ||
"name": "@ionic/cli-plugin-ionic-angular", | ||
"version": "1.5.0-alpha.34095a41", | ||
"version": "1.5.0-alpha.35fa3b5c", | ||
"description": "Ionic CLI build plugin for Ionic Angular projects", | ||
@@ -45,3 +45,3 @@ "homepage": "https://ionic.io/", | ||
"dependencies": { | ||
"@ionic/cli-utils": "1.7.0-alpha.34095a41", | ||
"@ionic/cli-utils": "1.8.0-alpha.35fa3b5c", | ||
"chalk": "^2.0.0", | ||
@@ -51,7 +51,7 @@ "tslib": "^1.7.1" | ||
"devDependencies": { | ||
"@angular/compiler": "^4.2.4", | ||
"@angular/compiler-cli": "^4.2.4", | ||
"@angular/core": "^4.2.4", | ||
"@angular/compiler": "^4.3.2", | ||
"@angular/compiler-cli": "^4.3.2", | ||
"@angular/core": "^4.3.2", | ||
"@ionic/app-scripts": "^2.1.0", | ||
"@ionic/cli-scripts": "0.4.0-alpha.34095a41", | ||
"@ionic/cli-scripts": "0.4.0-alpha.35fa3b5c", | ||
"@types/chalk": "^0.4.31", | ||
@@ -58,0 +58,0 @@ "@types/clean-css": "^3.4.30", |
19958
4.14%305
4.45%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed