-
-
Notifications
You must be signed in to change notification settings - Fork 197
Start livesync watcher before preparing the project #3576
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
ccaafd8
to
caeba7f
Compare
run ci |
run ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
Some minor comments.
lib/services/files-hash-service.ts
Outdated
const result: IStringDictionary = {}; | ||
|
||
const action = async (file: string) => { | ||
if (this.$fs.getFsStats(file).isFile()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you should try-catch this call, in case someone deletes the file while we are executing a previous chunk
@@ -58,9 +59,12 @@ export class ProjectChangesService implements IProjectChangesService { | |||
public async checkForChanges(platform: string, projectData: IProjectData, projectChangesOptions: IProjectChangesOptions): Promise<IProjectChangesInfo> { | |||
const platformData = this.$platformsData.getPlatformData(platform, projectData); | |||
this._changesInfo = new ProjectChangesInfo(); | |||
if (!this.ensurePrepareInfo(platform, projectData, projectChangesOptions)) { | |||
const isPrepareInfoEnsured = await this.ensurePrepareInfo(platform, projectData, projectChangesOptions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe the variable should be called isNewPrepareInfo
@@ -300,5 +305,20 @@ export class ProjectChangesService implements IProjectChangesService { | |||
} | |||
return false; | |||
} | |||
|
|||
private getAppFiles(appDirectoryPath: string): string[] { | |||
return this.$fs.enumerateFilesInDirectorySync(appDirectoryPath, (filePath: string, stat: IFsStats) => filePath.indexOf(APP_RESOURCES_FOLDER_NAME) === -1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it is better to ensure the path.basename(filePath) !== appresources name
You should not use the APP_RESOURCES_FOLDER_NAME constant here - you should read the value from projectData
as by using .nsconfig the user might change directory's name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After green build
PR Checklist
What is the current behavior?
Currently the project is prepared and after that a livesync watcher is started.
What is the new behavior?
LiveSync watcher is started and after that the project is prepared.
Implemented #3404