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

Scenery build fails to load synchronously #593

Closed
jonathanolson opened this issue Dec 13, 2016 · 2 comments
Closed

Scenery build fails to load synchronously #593

jonathanolson opened this issue Dec 13, 2016 · 2 comments

Comments

@jonathanolson
Copy link
Contributor

@samreid noted it may be related to phetsims/chipper#499.

This prevents documentation from being viewed, examples from being run, etc.

@jonathanolson jonathanolson self-assigned this Dec 13, 2016
jonathanolson added a commit to phetsims/kite that referenced this issue Dec 14, 2016
jonathanolson added a commit to phetsims/dot that referenced this issue Dec 14, 2016
jonathanolson added a commit to phetsims/chipper that referenced this issue Dec 14, 2016
Adds buildConfig isJSOnly and associated parameters, and modifies how things build when that is true (e.g. Scenery/Kite/Dot)
@jonathanolson
Copy link
Contributor Author

It looks like the synchronous support in chipper was reverted in phetsims/chipper@001c895 (don't see a comment why).

It looks like asynchronous may be preferable/required for sims (maybe the progress indicator?), so I've added support for both ways of doing things.

Scenery has an added section in package.json that illustrates the changes:

  "phet": {
    "isJSOnly": true,
    "requiresLodash": true,
    "requiresJQuery": true,
    "assignGlobals": {
      "scenery": "main",
      "kite": "KITE/main",
      "dot": "DOT/main",
      "axon": "AXON/main",
      "phetCore": "PHET_CORE/main"
    },
    "finalizeJS": "scenery.Util.polyfillRequestAnimationFrame();"
  }

where options are documented in getBuildConfig (and only relevant when isJSOnly is true).

This also allows us to just "grunt" or "grunt build" for Scenery/Kite/Dot, since we can detect whether a repo is isJSOnly before creating the tasks, so I've done that (makes things easier).

This fixes the issues I was having (asynchronous loading, various scripts/files not working) that were blocking other issues.

@samreid, can you review the changes, and potentially suggest alternatives?

@samreid
Copy link
Member

samreid commented Dec 15, 2016

I skimmed the change sets and it all seems reasonable (particularly regarding synchronous/asychronous in the requirejs build), and I like how grunt builds js code for libs now.

@samreid samreid closed this as completed Dec 15, 2016
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