Jump to content

Browserify

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by DannyS712 bot (talk | contribs) at 17:28, 11 May 2020 (Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Browserify
Developer(s)Browserling team and Browserify contributors
Initial release2011; 13 years ago (2011)
Stable release
16.5.1 / March 30, 2020; 4 years ago (2020-03-30)
Repositorygithub.com/browserify/browserify
Written inJavaScript
LicenseMIT License
Websitebrowserify.org

Browserify is an open-source JavaScript tool that allows developers to write Node.js-style modules that compile for use in the browser.[1]

Browserify lets you use require in the browser, the same way you'd use it in Node. It's not just syntactic sugar for loading scripts on the client. It's a tool that brings all the resources of the NPM ecosystem off of the server, and into the client.

Examples

Installation

$ npm install --global browserify

Execution

$ browserify source.js -o target.js

This adds the source of all the require modules and their dependencies used in source.js and bundles them in target.js. Browserify traverses the dependency graph, using your source.js as its entry point, and includes the source of every dependency it finds.

References

  1. ^ "NPM, Browserify, and modules". Retrieved 24 Dec 2014.