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

Commit 0227dc9

Browse files
committed
2 parents 042efb5 + 3b35371 commit 0227dc9

File tree

10 files changed

+741
-60
lines changed

10 files changed

+741
-60
lines changed

src/build.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,6 @@ function buildUpdateTasks(changedFiles: ChangedFile[], context: BuildContext) {
226226
};
227227

228228
return loadFiles(changedFiles, context)
229-
.then(() => {
230-
// PREPROCESS
231-
return preprocessUpdate(changedFiles, context);
232-
})
233229
.then(() => {
234230
// TEMPLATE
235231
if (context.templateState === BuildState.RequiresUpdate) {
@@ -258,6 +254,10 @@ function buildUpdateTasks(changedFiles: ChangedFile[], context: BuildContext) {
258254
return Promise.resolve();
259255

260256
})
257+
.then(() => {
258+
// PREPROCESS
259+
return preprocessUpdate(changedFiles, context);
260+
})
261261
.then(() => {
262262
// BUNDLE
263263
if (context.bundleState === BuildState.RequiresUpdate) {

src/deep-linking.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function deepLinkingWorker(context: BuildContext) {
3535
return deepLinkingWorkerImpl(context, null);
3636
}
3737

38-
function deepLinkingWorkerImpl(context: BuildContext, changedFiles: ChangedFile[]) {
38+
export function deepLinkingWorkerImpl(context: BuildContext, changedFiles: ChangedFile[]) {
3939
return Promise.resolve().then(() => {
4040
const appNgModulePath = getStringPropertyValue(Constants.ENV_APP_NG_MODULE_PATH);
4141
const appNgModuleFile = context.fileCache.get(appNgModulePath);
@@ -54,12 +54,16 @@ function deepLinkingWorkerImpl(context: BuildContext, changedFiles: ChangedFile[
5454
}
5555

5656
export function deepLinkingUpdate(changedFiles: ChangedFile[], context: BuildContext) {
57-
// TODO, consider optimizing later
57+
const tsFiles = changedFiles.filter(changedFile => changedFile.ext === '.ts');
58+
if (tsFiles.length === 0) {
59+
return Promise.resolve();
60+
}
5861
const logger = new Logger('deeplinks update');
5962
return deepLinkingWorkerImpl(context, changedFiles).then((deepLinkConfigEntries: DeepLinkConfigEntry[]) => {
6063
setParsedDeepLinkConfig(deepLinkConfigEntries);
6164
logger.finish();
6265
}).catch((err: Error) => {
66+
Logger.warn(err.message);
6367
const error = new BuildError(err.message);
6468
throw logger.fail(error);
6569
});

0 commit comments

Comments
 (0)