finds.dev← search

// the find

sahat/requirejs-library

★ 238 · JavaScript · MIT · updated Dec 2015

Skeleton project for building javascript libraries using Require.js

A boilerplate for authoring JavaScript libraries that work as AMD modules, CommonJS modules, and plain browser globals simultaneously. It's a 2013-era solution to the UMD problem, using RequireJS and Almond with a Gulp build pipeline. Anyone building a new library today would not use this.

The UMD wrapper split across _start.js and _end.js is clean — it separates the compatibility shim from your library code without cluttering either. Includes both Jasmine and Mocha setups so you can pick one without ripping out the other. Source map generation is wired up out of the box.

Dead since 2015: Bower is deprecated, Gulp 3 doesn't run on Node 12+, PhantomJS is abandoned, and david-dm.org is gone. RequireJS/AMD lost to CommonJS and then ESM years ago — nobody ships AMD modules anymore. The manual renaming steps required to change 'mylib' to your library name (five separate places) is error-prone and should have been a config variable. No TypeScript, no ES modules, no tree-shaking — the entire toolchain is obsolete.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →