Skip to content

refactor: introduce shouldprepare hook #3399

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
Mar 1, 2018
Merged

Conversation

Mitko-Kerezov
Copy link
Contributor

Introduce shouldPrepare hook.
Needed in order for plugins to be able to state when a project should undergo the prepare process.

Ping @rosen-vladimirov

@@ -187,13 +187,25 @@ export class PlatformService extends EventEmitter implements IPlatformService {
return _.filter(this.$platformsData.platformsNames, p => { return this.isPlatformPrepared(p, projectData); });
}

public async preparePlatform(platformInfo: IPreparePlatformInfo): Promise<boolean> {
@helpers.hook('shouldPrepare')
public async shouldPrepare(platformInfo: IPreparePlatformInfo, changesInfo?: IProjectChangesInfo): Promise<boolean> {
Copy link
Contributor

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 pass a single object

@Mitko-Kerezov Mitko-Kerezov merged commit c640f95 into master Mar 1, 2018
@Mitko-Kerezov Mitko-Kerezov deleted the kerezov/should-prepare branch March 1, 2018 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants