max-mapper / max-mapper/requirebin

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

Open
#43 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
JavaScript
Stars
389
Forks
73
PR merge metrics
No merged PRs in 30d

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the reported gist URL and inspect the browser console, then trace the gist-loading and Run path that decides whether to use minified.js or browserify-cdn. The fix is done when a manually created gist without minified.js runs successfully and the existing optimization still works for requirebin-saved gists.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.