moinejf / abc2svg

project moved to https://chiselapp.com/user/moinejf/repository/abc2svg
GNU Lesser General Public License v3.0
48 stars 7 forks source link

how to handle wps.js #105

Open bwl21 opened 6 years ago

bwl21 commented 6 years ago

I am using a rakefile to build and integrate abc2svg to my app. This rakefile takes all files in "modules" and tries to do build it. E.g.

from psvg.js, I perform NOMIN=1 ninja psvg-1.js

This has been working fine until wps.js was introduced. This is part of psvg-1.js but is not a module of its own. So now I need another way to find out which modules shall be built. As of now I patched my rakefile not to include wps-1.js.

What would you recommend?

moinejf commented 6 years ago

Apart the MIDI and perhaps the combine modules, I don't think you would be interested by the other modules, especially the PostScript interpreter. You should build only the subset you need.

Other solution: as you include the modules in the core, you don't need separate .js files. You could just concatenate all the .js files from core/ and modules/ and create only one minified file. This also solve the mangling problem with uglify.

bwl21 commented 6 years ago

This is exactly, what I do. I concatenate "abc2svg-1.js", "json-1.js", "setmidi-1.js", "play-1.js" plus the modules to one file and include this in my app.

As I do not know which modules, I really need, I "take them all" :-

How can I find, which module handles which parameter (http://moinejf.free.fr/abcm2ps-doc/index.html) in order to find out, what I really need?

moinejf commented 6 years ago

As you get all modules, you should not have any problem (except psvg.js - the bug is found thanks).

The modules are loaded by their associated pseudo-comments (%%/I:). The list is in the variable all_m in core/modules.js. The variables above give the name of the modules.