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

Commit e097d4e

Browse files
committed
feat(deep-linking): parsing deeplink decorator is now enabled by default, no longer experimental
parsing deeplink decorator is now enabled by default, no longer experimental
1 parent 2943188 commit e097d4e

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ npm run build --rollup ./config/rollup.config.js
131131
| print dependency tree | `ionic_print_original_dependency_tree` | `--printOriginalDependencyTree` | `null` | Set to `true` to print out the original dependency tree calculated during the optimize step |
132132
| print modified dependency tree | `ionic_print_modified_dependency_tree` | `--printModifiedDependencyTree` | `null` | Set to `true` to print out the modified dependency tree after purging unused modules |
133133
| print webpack dependency tree | `ionic_print_webpack_dependency_tree` | `--printWebpackDependencyTree` | `null` | Set to `true` to print out a dependency tree after running Webpack |
134-
| experimental parse deeplink config | `ionic_experimental_parse_deeplinks` | `--experimentalParseDeepLinks` | `null` | Set to `true` to parse the Ionic 3.x deep links API for lazy loading (Experimental) |
134+
| parse deeplink config | `ionic_parse_deeplinks` | `--parseDeepLinks` | `true` | Parses and extracts data from the `@DeepLink` decorator |
135135
| experimental manual tree shaking | `ionic_experimental_manual_treeshaking` | `--experimentalManualTreeshaking` | `null` | Set to `true` to purge unused Ionic components/code (Experimental) |
136136
| experimental purge decorators | `ionic_experimental_purge_decorators` | `--experimentalPurgeDecorators` | `null` | Set to `true` to purge unneeded decorators to improve tree shakeability of code (Experimental) |
137137
| experimental closure compiler | `ionic_use_experimental_closure` | `--useExperimentalClosure` | `null` | Set to `true` to use closure compiler to minify the final bundle |
@@ -176,7 +176,7 @@ These environment variables are automatically set to [Node's `process.env`](http
176176
| `IONIC_PRINT_ORIGINAL_DEPENDENCY_TREE` | boolean to print out the original dependency tree calculated during the optimize step |
177177
| `IONIC_PRINT_MODIFIED_DEPENDENCY_TREE` | boolean to print out the modified dependency tree after purging unused modules |
178178
| `IONIC_PRINT_WEBPACK_DEPENDENCY_TREE` | boolean to print out a dependency tree after running Webpack |
179-
| `IONIC_EXPERIMENTAL_PARSE_DEEPLINKS` | boolean to enable parsing the Ionic 3.x deep links API for lazy loading (Experimental) |
179+
| `IONIC_PARSE_DEEPLINKS` | boolean to enable parsing the Ionic 3.x deep links API for lazy loading |
180180
| `IONIC_EXPERIMENTAL_MANUAL_TREESHAKING` | boolean to enable purging unused Ionic components/code (Experimental) |
181181
| `IONIC_EXPERIMENTAL_PURGE_DECORATORS` | boolean to enable purging unneeded decorators from source code (Experimental) |
182182
| `IONIC_USE_EXPERIMENTAL_CLOSURE` | boolean to enable use of closure compiler to minify the final bundle |

src/preprocess.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function preprocess(context: BuildContext) {
2222
}
2323

2424
function preprocessWorker(context: BuildContext) {
25-
const deepLinksPromise = getBooleanPropertyValue(Constants.ENV_EXPERIMENTAL_PARSE_DEEPLINKS) ? deepLinking(context) : Promise.resolve();
25+
const deepLinksPromise = getBooleanPropertyValue(Constants.ENV_PARSE_DEEPLINKS) ? deepLinking(context) : Promise.resolve();
2626
return deepLinksPromise
2727
.then(() => {
2828
if (context.optimizeJs) {
@@ -51,7 +51,7 @@ export function writeFilesToDisk(context: BuildContext) {
5151
}
5252

5353
export function preprocessUpdate(changedFiles: ChangedFile[], context: BuildContext) {
54-
if (getBooleanPropertyValue(Constants.ENV_EXPERIMENTAL_PARSE_DEEPLINKS)) {
54+
if (getBooleanPropertyValue(Constants.ENV_PARSE_DEEPLINKS)) {
5555
return deepLinkingUpdate(changedFiles, context);
5656
}
5757
return Promise.resolve();

src/util/config.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ describe('config', () => {
146146
expect(fakeConfig[Constants.ENV_TOAST_VIEW_CONTROLLER_PATH]).toEqual(join(context.ionicAngularDir, 'components', 'toast', 'toast.js'));
147147
expect(fakeConfig[Constants.ENV_TOAST_COMPONENT_FACTORY_PATH]).toEqual(join(context.ionicAngularDir, 'components', 'toast', 'toast-component.ngfactory.js'));
148148

149-
expect(fakeConfig[Constants.ENV_EXPERIMENTAL_PARSE_DEEPLINKS]).toBeFalsy();
149+
expect(fakeConfig[Constants.ENV_PARSE_DEEPLINKS]).toBeTruthy();
150150
expect(fakeConfig[Constants.ENV_EXPERIMENTAL_MANUAL_TREESHAKING]).toBeFalsy();
151151
expect(fakeConfig[Constants.ENV_EXPERIMENTAL_PURGE_DECORATORS]).toBeFalsy();
152152
expect(fakeConfig[Constants.ENV_USE_EXPERIMENTAL_CLOSURE]).toBeFalsy();

src/util/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ export function generateContext(context?: BuildContext): BuildContext {
268268
setProcessEnvVar(Constants.ENV_TOAST_COMPONENT_FACTORY_PATH, join(context.ionicAngularDir, 'components', 'toast', 'toast-component.ngfactory.js'));
269269

270270
/* Experimental Flags */
271-
const experimentalParseDeepLinks = getConfigValue(context, '--experimentalParseDeepLinks', null, Constants.ENV_EXPERIMENTAL_PARSE_DEEPLINKS, Constants.ENV_EXPERIMENTAL_PARSE_DEEPLINKS.toLowerCase(), null);
272-
setProcessEnvVar(Constants.ENV_EXPERIMENTAL_PARSE_DEEPLINKS, experimentalParseDeepLinks);
273-
Logger.debug(`experimentalParseDeepLinks set to ${experimentalParseDeepLinks}`);
271+
const parseDeepLinks = getConfigValue(context, '--parseDeepLinks', null, Constants.ENV_PARSE_DEEPLINKS, Constants.ENV_PARSE_DEEPLINKS.toLowerCase(), 'true');
272+
setProcessEnvVar(Constants.ENV_PARSE_DEEPLINKS, parseDeepLinks);
273+
Logger.debug(`parseDeepLinks set to ${parseDeepLinks}`);
274274

275275
const experimentalManualTreeshaking = getConfigValue(context, '--experimentalManualTreeshaking', null, Constants.ENV_EXPERIMENTAL_MANUAL_TREESHAKING, Constants.ENV_EXPERIMENTAL_MANUAL_TREESHAKING.toLowerCase(), null);
276276
setProcessEnvVar(Constants.ENV_EXPERIMENTAL_MANUAL_TREESHAKING, experimentalManualTreeshaking);

src/util/constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ export const ENV_NG_MODULE_FILE_NAME_SUFFIX = 'IONIC_NG_MODULE_FILENAME_SUFFIX';
6969
export const ENV_PRINT_ORIGINAL_DEPENDENCY_TREE = 'IONIC_PRINT_ORIGINAL_DEPENDENCY_TREE';
7070
export const ENV_PRINT_MODIFIED_DEPENDENCY_TREE = 'IONIC_PRINT_MODIFIED_DEPENDENCY_TREE';
7171
export const ENV_PRINT_WEBPACK_DEPENDENCY_TREE = 'IONIC_PRINT_WEBPACK_DEPENDENCY_TREE';
72+
export const ENV_PARSE_DEEPLINKS = 'IONIC_PARSE_DEEPLINKS';
7273

7374
/* Flags for experimental stuff */
74-
export const ENV_EXPERIMENTAL_PARSE_DEEPLINKS = 'IONIC_EXPERIMENTAL_PARSE_DEEPLINKS';
75+
7576
export const ENV_EXPERIMENTAL_MANUAL_TREESHAKING = 'IONIC_EXPERIMENTAL_MANUAL_TREESHAKING';
7677
export const ENV_EXPERIMENTAL_PURGE_DECORATORS = 'IONIC_EXPERIMENTAL_PURGE_DECORATORS';
7778
export const ENV_USE_EXPERIMENTAL_CLOSURE = 'IONIC_USE_EXPERIMENTAL_CLOSURE';

0 commit comments

Comments
 (0)