Browserify
Browserify is an open-source JavaScript tool that allows developers to write Node.js-style modules that compile for use in the browser.[1]
![]() | |
Developer(s) | Browserling team and Browserify contributors |
---|---|
Initial release | 2011 |
Stable release | 16.5.1
/ March 30, 2020 |
Repository | github |
Written in | JavaScript |
License | MIT License |
Website | browserify |
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.
gollark: It's too late, I AM using JavaScript.
gollark: Windows 95 is 8.64 better, yes.
gollark: I suppose, but that's moderately harder and also cropping things means loss of quality due to recompression, while cutting out time segments of a video is fine.
gollark: But you can really easily remove those.
gollark: As a counterproverb. But it doesn't actually *matter*, since they aren't true.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.