Here’s the Deal
Slant is powered by a community that helps you make informed decisions. Tell us what you’re passionate about to get your personalized feed and help others.
While it's not too hard to create npm package for an existing library, it means maintaining it when the library updates. While most libraries are now on npm, many client side specific libraries are not. It's possible to require local files instead, at the expense of not having npm managed version control. See More
To require a file, just use the require() function. var foo = require('./foo.js'); These files may have dependencies of their own. Browserify will build a dependency graph and bundle it into a single file that you just have to put in a script tag. <html> <body> <script src="bundle.js"></script> </body> </html> See More