Skip to content

Commit a763fd6

Browse files
committed
Exclude explicitly changes in App_Resources folder and warn the user.
Related to NativeScript/nativescript-cli#1773
1 parent 047d7f0 commit a763fd6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

services/livesync-service-base.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import * as shell from "shelljs";
77
import * as path from "path";
88
import * as temp from "temp";
99
import * as minimatch from "minimatch";
10+
import * as constants from "../../constants";
1011
let gaze = require("gaze");
1112

1213
class LiveSyncServiceBase implements ILiveSyncServiceBase {
@@ -66,6 +67,11 @@ class LiveSyncServiceBase implements ILiveSyncServiceBase {
6667
fiberBootstrap.run(() => {
6768
that.$dispatcher.dispatch(() => (() => {
6869
try {
70+
if (filePath.indexOf(constants.APP_RESOURCES_FOLDER_NAME) !== -1) {
71+
that.$logger.warn(`Skipping livesync for changed file ${filePath}. This change requires a full build to update your application. `.yellow.bold);
72+
return;
73+
}
74+
6975
if (that.isFileExcluded(filePath, data.excludedProjectDirsAndFiles)) {
7076
that.$logger.trace(`Skipping livesync for changed file ${filePath} as it is excluded in the patterns: ${data.excludedProjectDirsAndFiles.join(", ")}`);
7177
return;

0 commit comments

Comments
 (0)