Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

[proposal] Use requirejs in development #41

Open
aerhard opened this issue Jun 28, 2014 · 2 comments
Open

[proposal] Use requirejs in development #41

aerhard opened this issue Jun 28, 2014 · 2 comments

Comments

@aerhard
Copy link

aerhard commented Jun 28, 2014

The current modular design of mei2vf has got one disadvantage: You can't inherit across files at an early stage, i.e. when the closures in the files are executed.
With the current design, when you want to inherit from a class on closure-level, you have to define the superclass in the same file, that's why there are multiple classes in https://github.com/TEI-Music-SIG/MEItoVexFlow/blob/master/src/PointerCollections.js, for example.
Requirejs would solve this in a much better way. Another advantage could be that you should be able to include xmldom client-side (see issue #17). I gave requirejs a try with mei2vf and it looks promising to me. Mei2vf's build process could even be designed in a way similar to jQuery's where the built files don't depend on requirejs. What do you think about using requirejs?

@aerhard
Copy link
Author

aerhard commented Jun 30, 2014

Here's a demo with requirejs in which I also added the google closure compiler: https://github.com/aerhard/MEItoVexFlow/tree/require-js -- structure in /src is not final, but it should be enough to get an impression. Do you think it would be worth further exploring this path?

@aerhard
Copy link
Author

aerhard commented Jun 30, 2014

(dist/meitovexflow.js and dist/meitovexflow.min.js are built anew; ignore that meiview's code is in the closure and then exported to the window object -- I think that shouldn't stay this way)

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

No branches or pull requests

1 participant