yenbao1340 / gmaps-utility-library-dev

Automatically exported from code.google.com/p/gmaps-utility-library-dev
0 stars 0 forks source link

Start using better system for checking if packed JS works #72

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Currently the way we test the packed JS is by duplicating one or multiple 
files and point them to the packed JS instead. Here's a suggestion from 
Nianwei:
"
Duplicate example with packed script will be a daunting task,
especially there are many examples. If you actually open browser to
see if the example works, you can avoid dup and sync all example files
by:

in the place of <script src='../src/myscript.js'></script>

change to:

<script type="text/javascript">
        document.write('<script type="text/javascript" src="../src/
myscript'+(document.location.search.indexOf('packed')>-1?'_packed':'')
+'.js"><'+'/script>');
       </script>

the you can simply use

myexample.html to test the regular one and

myexample.html?packed to test the packed version.
"

My only concern with this is that it makes the HTML slightly harder to read 
for newbie developers.

Original issue reported on code.google.com by pamela.fox on 7 Oct 2008 at 7:07