Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thundergolfer/c11f81ef178004816f8675eb3082664d to your computer and use it in GitHub Desktop.
Save thundergolfer/c11f81ef178004816f8675eb3082664d to your computer and use it in GitHub Desktop.

Browserify: Running Node JS in the browser

Prerequisites

  1. Install Node JS
  2. Check installation of NodeJS and NPM (installed with NodeJS): npm -v and node -v

The Problem

If you want to develop some Javascript the needs to run in a browser and want to make use of the NodeJS development and package ecosystem, much of which involves code that is incompatible with a browser, then you'll need a way to transform browser-incompatible code into compatible code.

1 Solution

http://browserify.org/

I made use of it recently for thundergolfer/better-hackerrank-test-workflow. (currently private)

Meeting activities

  • Use browserify to transform some NodeJS script into browser compatible code and run it in your browser
  • Talk about exactly what browserify is doing under the hood
  • Talk about alternatives to browserify that solve the same problem, possibly in different contexts (eg. webpack)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment