max-mapper/requirebin

re-bundle module if there is no minified.js on gist

Open

#43 opened on Mar 23, 2014

View on GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (73 forks)github user discovery
help wanted

Repository metrics

Stars
 (389 stars)
PR merge metrics
 (PR metrics pending)

Description

There is an optimization where;

  • If you load a gist into requirebin via the ?gist= URL on page load
  • requirebin md5 hashes the index.js of the gist when you load it
  • when you hit Run, if you have not edited index.js (e.g. the hash of the code in the editor matches the hash of the code at load time) then the optimization is to just load minified.js from the gist directly, otherwise if the hashes don't match then requirebin does a full rebuild from browserify-cdn

the optimization works great except for the case where there is no minified.js in the gist. any gist saved by requirebin will have a minified.js, but ones that are made manually dont, e.g. https://gist.github.com/NHQ/9711493

To reproduce the bug: open http://requirebin.com/?gist=NHQ/9711493 and hit 'run', then look at the console

Contributor guide