Skip to content

.map and .ts files are excluded in release only #1846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/services/livesync/livesync-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class LiveSyncService implements ILiveSyncService {
private $projectData: IProjectData,
private $projectDataService: IProjectDataService,
private $prompter: IPrompter,
private $injector: IInjector) { }
private $injector: IInjector,
private $options: IOptions) { }

private ensureAndroidFrameworkVersion(platformData: IPlatformData): IFuture<void> { // TODO: this can be moved inside command or canExecute function
return (() => {
Expand Down Expand Up @@ -64,7 +65,7 @@ class LiveSyncService implements ILiveSyncService {
appIdentifier: this.$projectData.projectId,
projectFilesPath: path.join(platformData.appDestinationDirectoryPath, constants.APP_FOLDER_NAME),
syncWorkingDirectory: path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME),
excludedProjectDirsAndFiles: constants.LIVESYNC_EXCLUDED_FILE_PATTERNS,
excludedProjectDirsAndFiles: this.$options.release ? constants.LIVESYNC_EXCLUDED_FILE_PATTERNS : [],
forceExecuteFullSync: this.forceExecuteFullSync
};
this.$liveSyncServiceBase.sync(liveSyncData).wait();
Expand Down
7 changes: 5 additions & 2 deletions lib/services/platform-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,11 @@ export class PlatformService implements IPlatformService {
// verify .xml files are well-formed
this.$xmlValidator.validateXmlFiles(sourceFiles).wait();

// Remove .ts and .js.map files
constants.LIVESYNC_EXCLUDED_FILE_PATTERNS.forEach(pattern => sourceFiles = sourceFiles.filter(file => !minimatch(file, pattern, { nocase: true })));
// Remove .ts and .js.map files in release
if (this.$options.release) {
constants.LIVESYNC_EXCLUDED_FILE_PATTERNS.forEach(pattern => sourceFiles = sourceFiles.filter(file => !minimatch(file, pattern, { nocase: true })));
}

let copyFileFutures = sourceFiles.map(source => {
let destinationPath = path.join(appDestinationDirectoryPath, path.relative(appSourceDirectoryPath, source));
if (this.$fs.getFsStats(source).wait().isDirectory()) {
Expand Down
2 changes: 1 addition & 1 deletion lib/services/test-execution-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class TestExecutionService implements ITestExecutionService {
projectFilesPath: projectFilesPath,
syncWorkingDirectory: path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME),
canExecuteFastSync: false, // Always restart the application when change is detected, so tests will be rerun.
excludedProjectDirsAndFiles: constants.LIVESYNC_EXCLUDED_FILE_PATTERNS
excludedProjectDirsAndFiles: this.$options.release ? constants.LIVESYNC_EXCLUDED_FILE_PATTERNS : []
};

this.$liveSyncServiceBase.sync(liveSyncData).wait();
Expand Down