Skip to content

Commit 664d7b9

Browse files
authored
Update to 3.2.1 from upstream/master (#1)
3.1.9: * fix(2889): fix build error with --prod * fix(serve): start listening when watch is ready * fix(live-server): update android platform path (ionic-team#1407) * docs(changelog): 3.1.9 3.1.10: * Update node-sass dependency (ionic-team#1435) Updating node-sass dependency from 4.7.2 to 4.9.0 to make it works with node 10 on windows (build fail with ionic start) * chore(package): bump deps (ionic-team#1421) * chore(deps): no package lock * chore(changelog): 3.1.10 3.1.11: * fix(serve): fix EADDRINUSE issue with dev logger server fixes ionic-team/ionic-cli#3368 fixes ionic-team/ionic-cli#1678 fixes ionic-team/ionic-cli#1830 fixes ionic-team/ionic-cli#1721 fixes ionic-team/ionic-cli#1866 fixes ionic-team/ionic-cli#1808 fixes ionic-team/ionic-cli#3022 * docs(changelog): 3.1.11 changes 3.2.0: * feat(environments): configuration via process.env.VAR replacement (ionic-team#1471) * fix(sass): remove PostCSS warning (ionic-team#1364) This removes following warning: Remove warning: Without `from` option PostCSS could generate wrong source map or do not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning `from: the input file name (most runners set it automatically).` Source: https://github.com/postcss/postcss Fixes ionic-team#1359 #13763 ionic-team#1359 ionic-team/ionic-framework#13763 * fix(serve): use wss protocol for secure websocket when page is using https (ionic-team#1358) * docs(changelog): 3.2.0 3.2.1: * docs(readme): add note about existing declaration addresses ionic-team/ionic-cli#3541 * chore(deps): update webpack to 3.12.0 (ionic-team#1477) * chore(deps): bump node-sass to 4.9.3 to fix security warnings (ionic-team#1483) * chore(deps): bump node-sass to 4.10.0 to fix security warnings (ionic-team#1493) * docs(changelog): 3.2.1
1 parent bc0b87a commit 664d7b9

12 files changed

+183
-7457
lines changed

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

CHANGELOG.md

+48
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
1+
<a name="3.2.1"></a>
2+
## [3.2.1](https://github.com/ionic-team/ionic-app-scripts/compare/v3.2.0...v3.2.1) (2018-11-26)
3+
4+
* Security release for dependencies for `node-sass`
5+
6+
<a name="3.2.0"></a>
7+
# [3.2.0](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.11...v3.2.0) (2018-08-24)
8+
9+
10+
### Bug Fixes
11+
12+
* **sass:** remove PostCSS warning ([#1364](https://github.com/ionic-team/ionic-app-scripts/issues/1364)) ([1e2035e](https://github.com/ionic-team/ionic-app-scripts/commit/1e2035e)), closes [#1359](https://github.com/ionic-team/ionic-app-scripts/issues/1359) [#13763](https://github.com/ionic-team/ionic-app-scripts/issues/13763)
13+
* **serve:** use wss protocol for secure websocket when page is using https ([#1358](https://github.com/ionic-team/ionic-app-scripts/issues/1358)) ([29c3e23](https://github.com/ionic-team/ionic-app-scripts/commit/29c3e23))
14+
15+
16+
### Features
17+
18+
* **environments:** configuration via process.env.VAR replacement ([#1471](https://github.com/ionic-team/ionic-app-scripts/issues/1471)) ([53fc341](https://github.com/ionic-team/ionic-app-scripts/commit/53fc341))
19+
20+
21+
22+
<a name="3.1.11"></a>
23+
## [3.1.11](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.10...v3.1.11) (2018-07-12)
24+
25+
26+
### Bug Fixes
27+
28+
* **serve:** fix EADDRINUSE issue with dev logger server ([271a6e1](https://github.com/ionic-team/ionic-app-scripts/commit/271a6e1))
29+
30+
31+
32+
<a name="3.1.10"></a>
33+
## [3.1.10](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.9...v3.1.10) (2018-06-11)
34+
35+
36+
37+
<a name="3.1.9"></a>
38+
## [3.1.9](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.8...v3.1.9) (2018-04-18)
39+
40+
41+
### Bug Fixes
42+
43+
* **2889:** fix build error with --prod ([94e5f7c](https://github.com/ionic-team/ionic-app-scripts/commit/94e5f7c))
44+
* **live-server:** update android platform path ([#1407](https://github.com/ionic-team/ionic-app-scripts/issues/1407)) ([1591c81](https://github.com/ionic-team/ionic-app-scripts/commit/1591c81))
45+
* **serve:** start listening when watch is ready ([06bbd06](https://github.com/ionic-team/ionic-app-scripts/commit/06bbd06))
46+
47+
48+
149
<a name="3.1.8"></a>
250
## [3.1.8](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.7...v3.1.8) (2018-01-18)
351

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,21 @@ To run the `build` script found in the `package.json` `scripts` property, execut
5252
npm run build
5353
```
5454

55+
## Environments
56+
57+
You can use Node style `process.env.MY_VAR` syntax directly in your typescript
58+
and when the application is bundled it'll be replaced with the following order of precedence:
59+
* If the variable exists in the process environment it will be replaced with that value.
60+
* If the variable is not defined in the process environment it will be read from a `.env.dev`
61+
file for dev builds or `.env.prod` file for prod builds which are located in the root of the app
62+
* If the variable is not defined in either place it will be `undefined`
63+
64+
In order to take advantage of this apps will need a `src/declarations.d.ts` file with the following declaration:
65+
```typescript
66+
declare var process: { env: { [key: string]: string | undefined; } };
67+
```
68+
69+
*Note*: This declaration may conflict if `@types/node` is installed in your project. See [#3541](https://github.com/ionic-team/ionic-cli/issues/3541).
5570

5671
## Custom Configuration
5772

bin/ion-dev.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ window.IonicDevServer = {
9898

9999
openConnection: function() {
100100
var self = this;
101-
this.socket = new WebSocket('ws://' + window.location.hostname + ':' + IonicDevServerConfig.wsPort);
101+
var socketProtocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
102+
this.socket = new WebSocket(socketProtocol + '//' + window.location.hostname + ':' + IonicDevServerConfig.wsPort);
102103

103104
this.socket.onopen = function(ev) {
104105
self.socketReady = true;

config/webpack.config.js

+11
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
var path = require('path');
1111
var webpack = require('webpack');
1212
var ionicWebpackFactory = require(process.env.IONIC_WEBPACK_FACTORY);
13+
const Dotenv = require('dotenv-webpack');
1314

1415
var ModuleConcatPlugin = require('webpack/lib/optimize/ModuleConcatenationPlugin');
1516
var PurifyPlugin = require('@angular-devkit/build-optimizer').PurifyPlugin;
@@ -91,6 +92,11 @@ var devConfig = {
9192
},
9293

9394
plugins: [
95+
new Dotenv({
96+
path: '.env.dev', // load this now instead of the ones in '.env'
97+
systemvars: true, // load all the predefined 'process.env' variables which will trump anything local per dotenv specs.
98+
silent: true // hide any errors
99+
}),
94100
ionicWebpackFactory.getIonicEnvironmentPlugin(),
95101
ionicWebpackFactory.getCommonChunksPlugin()
96102
],
@@ -124,6 +130,11 @@ var prodConfig = {
124130
},
125131

126132
plugins: [
133+
new Dotenv({
134+
path: '.env.prod', // load this now instead of the ones in '.env'
135+
systemvars: true, // load all the predefined 'process.env' variables which will trump anything local per dotenv specs.
136+
silent: true // hide any errors
137+
}),
127138
ionicWebpackFactory.getIonicEnvironmentPlugin(),
128139
ionicWebpackFactory.getCommonChunksPlugin(),
129140
new ModuleConcatPlugin(),

0 commit comments

Comments
 (0)