mobify / mobifyjs

Mobify.js was a JavaScript framework for optimizing sites for mobile. It is no longer actively maintained.
https://www.mobify.com/
Other
643 stars 83 forks source link

New mobify build error #296

Open lbineau opened 10 years ago

lbineau commented 10 years ago

The new mobify.min.js (the one with "Fixes some issues with picture that have to do with the latest spec") is trying to load other files through requireJS : mobifyjs/utils mobifyjs/capture mobifyjs/resizeImages mobifyjs/jazzcat mobifyjs/unblockify mobifyjs/cssOptimize mobifyjs/external/picturefill

The minified version should embed them right ? So I get an error and the script is not working.

Any idea ?

jansepar commented 9 years ago

Hi @lbineau sorry for taking so long to get back to you! I just quickly tried it out and I don't seem to get any errors when embedding the script into a sample html page. Here it is:

https://gist.github.com/jansepar/96991a2930604fd497ea

Could you give me more explicit steps to reproduce?

lbineau commented 9 years ago

Hi @jansepar ,

Could you try to add a the following updated tags in the demo page to see if it's actually working ?

Performance purpose :

    <img src="my-image.jpg"
         srcset="my-image.jpg 1x,
                 my-image-320.jpg 320w 1x,
                 my-image-640.jpg 320w 2x"
         width="850" height="475" alt="">

http://www.webkit.org/demos/srcset/

or

Art direction purpose :

    <picture>
      <source 
        media="(min-width: 650px)"
        srcset="images/kitten-stretching.png">
      <source 
        media="(min-width: 465px)"
        srcset="images/kitten-sitting.png">
      <img 
        src="images/kitten-curled.png" 
        alt="a cute kitten">
    </picture>

http://www.html5rocks.com/en/tutorials/responsive/picture-element/

Thank you.