Skip to content

chore: don't show warnings for {N} plugins without native code when bundle option is provided #3904

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 2 commits into from
Sep 18, 2018

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented Sep 18, 2018

PR Checklist

What is the current behavior?

A warning is shown for plugin with only .js files when tns preview --bundle command is executed

What is the new behavior?

A warning is not shown for plugin with only .js files when tns preview --bundle command is executed

return this.isNativeScriptPlugin(localPlugin) && !this.hasNativeCode(localPlugin, platform);
}

private isNativeScriptPlugin(localPlugin: string): boolean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can move this method to pluginsService.

}

private hasNativeCode(localPlugin: string, platform: string): boolean {
const nativeFolderPath = path.join(this.$projectData.projectDir, NODE_MODULES_DIR_NAME, localPlugin, "platforms", platform.toLowerCase());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"platforms" -> PLATFORMS_DIR_NAME from constants

@Fatme Fatme merged commit 7c9c635 into master Sep 18, 2018
@Fatme Fatme deleted the fatme/js-plugins branch September 18, 2018 12:49
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.

3 participants