Skip to content
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

Remove app.stub.js #79

Closed
lathonez opened this issue Apr 20, 2016 · 10 comments
Closed

Remove app.stub.js #79

lathonez opened this issue Apr 20, 2016 · 10 comments

Comments

@lathonez
Copy link
Owner

This is the last horrible workaround we've got really, should pick it up with the Ionic guys to get to the bottom of it.

@lathonez
Copy link
Owner Author

Finally got an index.html wrapper to load in Chrome, surprisingly doesn't solve the problem

@lathonez
Copy link
Owner Author

lathonez commented Apr 20, 2016

Adding to Karma's static (context.html) solves it

<!DOCTYPE html>
<!--
This is the execution context.
Loaded within the iframe.
Reloaded before every execution run.
-->
<html>
<head>
  <title></title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
</head>
<body>
  <!-- The scripts need to be in the body DOM element, as some test running frameworks need the body
       to have already been created so they can insert their magic into it. For example, if loaded
       before body, Angular Scenario test framework fails to find the body and crashes and burns in
       an epic manner. -->
  <script type="text/javascript">
    // sets window.__karma__ and overrides console and error handling
    // Use window.opener if this was opened by someone else - in a new window
    if (window.opener) {
      window.opener.karma.setupContext(window);
    } else {
      window.parent.karma.setupContext(window);
    }

    // All served files with the latest timestamps
    %MAPPINGS%
  </script>
  <!-- Dynamically replaced with <script> tags -->
  %SCRIPTS%
  <script type="text/javascript">
    window.__karma__.loaded();
  </script>
  <ion-app></ion-app>
</body>
</html>

which is a lot nicer than this fuckery we're doing atm. Just need to figure out how to do that dynamically...

@lathonez
Copy link
Owner Author

karma-runner/karma#1825

@lathonez
Copy link
Owner Author

That's all fine but obviously it hasn't actually been released yet.

@lathonez
Copy link
Owner Author

5de5e5d

Ready for when Karma release 0.13.23

@lathonez
Copy link
Owner Author

Need to update blog dependencies & files after this

@mavogel
Copy link
Contributor

mavogel commented Apr 22, 2016

Awesome work man! :)
Do you know when they'll release the new Karma version? Last release was in March.
Somebody already asked in the gitter-channerl but I guess there was no reply yet. Well I felt free to ask again ;)

FYI: I migrated you app to the latest beta6 of ionic because beta4 has an ugly bug and the app does not run on Android (whitescreen only). I hope they'll release Karma asap.

@lathonez
Copy link
Owner Author

Ah nice, hopefully someone gets back to you in gitter. Looking at the pattern of their last releases I feel like one should be due now!

I didn't know about that bug, will upgrade now..

@lathonez
Copy link
Owner Author

Removed as per 5f096f7

The npm postinstall solution for karma static barely warrants a new version tbh. Have had to downgrade to 0.13.9 due to karma-runner/karma#1788

@lathonez
Copy link
Owner Author

Re the previous comment, @lazaromenezes has implemented this correctly in #137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants