BROWSER-PACK(1)

πŸ’– browser-pack(1) β€” the manual page, but make it make sense πŸ’–

okay bestie, gather round, because today we're talking about browser-pack, and honestly? she's lowkey the backbone of the whole browserify situation. no cap.


✨ NAME ✨

browser-pack β€” pack Node.js source file information for browserify uses 🫢


🌸 SYNOPSIS 🌸

browser-pack [file]

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: browser-pack packs node-style source files from a json stream into a browser bundle. it's giving compiler energy, honestly.

browser-pack will input a json file and output a javascript file. that's the whole glow-up. ✨

and by default? browser-pack will read from STDIN. periodt. πŸ’…


πŸŽ€ EXAMPLES πŸŽ€

here's the iconic little demo, copy it exactly bestie, no editing:

browser-pack <<EOF
[
  {
    "id": "a1b5af78",
    "source": "console.log(require('./foo')(5))",
    "deps": { "./foo": "b8f69fa5" },
    "entry": true
  },
  {
    "id": "b8f69fa5",
    "source": "module.exports = function (n) { return n * 111 }",
    "deps": {}
  }
]
EOF

like… the way that just flows straight into STDIN? obsessed. πŸ˜­πŸ’–


🌈 SEE ALSO 🌈


and that's the whole page, bestie!! this little legend is from browser-pack(1), dated 8/4/17 β€” mwah, iconic, no notes. πŸ’…βœ¨πŸŽ€πŸ¦‹