8000 Export our JS using AMD-compatible modules (2) by almarklein · Pull Request #271 · flexxui/flexx · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Export our JS using AMD-compatible modules (2) #271

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 65 commits into from
Nov 17, 2016
Merged

Export our JS using AMD-compatible modules (2) #271

merged 65 commits into from
Nov 17, 2016

Conversation

almarklein
Copy link
Member
@almarklein almarklein commented Nov 16, 2016

This supersedes #225 (since that branch seemed broken).

This is related to #224 (fixes part of it). The description/discussion here focuses on the implementation in Flexx. Implements #231.

This PR turned rather epic. PR's merged into this: #254, #264, #266.

  • Improve reporting of PyScript transpilation errors.
  • Remove support for import syntax in PyScript.
  • PyScript has better (more explicit) support for modules (of different types).
  • Provide a mechanism to create JS assets as modules. Dependencies and exports can be defined on these module objects, and to some extend automatically detected.
  • Refactor asset manager to be aware (or not?) of modules.
  • Put JS loader logic in PyScript subpackage
  • Make sure that it works with requirejs (i.e. in the notebook)
  • Automate the dependency of PyScript std (and importing its names).
  • Make export work again; it breaks the docs.
  • Fix / add tests
  • Implement backward compatible create_module_assets() function for now.
  • Can get rid of flexx.classes prefix for Model classes.
  • Can get rid of mangling to make isinstance() (and super()?) work for Model classes.
  • Allow interactive mode (besides the notebook), so we can better test module loading.
  • Update docs on assets and data.
  • Update docs on PyScript modules.

Next

  • Load remote assets without deps at the end.
  • require using import? we now do this via imports in Python!
  • Improve Flexx loader so it can load modules out of order. (no rush, as we control the order that the assets are added to the page).
  • Make it work with webpack window.define() provided by Jupyterlab
  • PyScript std can probably reduce/remove prefixes, since they are not global anymore. Also look at reducing size of single-class modules (half of the code is stdlib imports :/ ).
  • Minification (light-weight) of the modules we produce
  • Maybe remove support for nodejs in flexx.app and flexx.webruntime; only targeting browsers simplifies things a lot. If not, make sure it works (again).
  • Do we want per-session assets or not?
  • Improve data handling (see Provide means to send large (binary) data between Python and JS #143)

@almarklein almarklein changed the title Modules4 Export our JS using AMD-compatible modules (2) Nov 16, 2016
@almarklein almarklein added this to the v0.5 milestone Nov 16, 2016
@almarklein
Copy link
Member Author

I think this is done for now. Hooray!

@Korijn
Copy link
Korijn commented Nov 17, 2016

Hooray indeed. :)

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

Successfully merging this pull request may close these issues.

2 participants
0