[mapguide-users] Fusion Single File Compress

Jackie Ng jumpinjackie at gmail.com
Mon Dec 10 03:43:40 PST 2018


The correct workflow for modifying fusion should *never* be editing
fusionSF.js directly. Since this seems to be the approach others have been
using, let me explain the proper way that fusion should be modified.

Firstly, take an example template (eg. Slate) and modify its index.html so
that instead of pointing to fusionSF-compressed.js, it points to fusion.js.
This is effectively the dev/debug version of fusion and should be your
starting point before doing any changes.

>From here, open up your browser dev tools so you can see the underlying js
files for the various widgets/etc, and identify the files that need
modification.

Modify these files, save, reload browser, repeat until your modifications
are tested to be working.

Now here's the part that most seem to skip over. You want to download the
"Fusion build tools" package for your particular release of MapGuide (3.1.1
version here: https://trac.osgeo.org/mapguide/wiki/Release/3.1.1/Notes),
older releases will have the appropriate download link in their release
notes. The Fusion build tools requires you have Apache Ant
(https://ant.apache.org/) installed and that the "ant" command works from
the command-line. Take this zip file and extract it into your fusion
directory and then run "ant compress" from that folder on the command line
to build new copies of fusionSF.js and fusionSF-compressed.js

And then to verify your changes were "compiled" in, edit your template file
to switch from fusion.js back to fusionSF-compressed.js. Reload your
template and your changes should still be there.

Hope that helps.

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html


More information about the mapguide-users mailing list