Skip to content

Do not copy app files to platform dir if using --bundle #2147

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
Oct 19, 2016

Conversation

hdeshev
Copy link
Contributor

@hdeshev hdeshev commented Oct 18, 2016

Cleaning up the target app dir turned out to be a hairy issue here. There is no way to know if the target app dir has been prepared without --bundle before the current prepare step. If it has, it needs to be cleaned up, but if it hasn't... it's highly likely that a custom webpack process ran just before preparing the app, and we should not touch anything.

The solution I came up with is the following:

  • implement app cleanup as a separate command
  • change the workflow to manually invoke tns clean-app android before bundling
  • run your bundle process (webpack, etc)
  • then finish up with a tns build or a tns run command.

I moved app updates (clean/copy) to a separate class, and added unit tests. This PR also fixes the test failure crash due to trying to send the assertion exception details via our analytics service.

Fixes #2111

@hdeshev hdeshev merged commit 14ce44a into master Oct 19, 2016
@hdeshev hdeshev deleted the hdeshev/webpack-app-dir branch October 19, 2016 08:09
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.

Prevent app folder updates when --bundle option used
1 participant