HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
sahat
requirejs-library
JavaScript2013–2013
sahat / requirejs-library

requirejs-library

Skeleton project for building javascript libraries using Require.js

2Distinct people
2Mentions
0Explicit recommenders
238GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Skeleton project for building javascript libraries using Require.js

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour2 dated mentions

Observed mentions: 2013-11-06 14:42:09 UTC to 2013-11-06 15:56:37 UTC.

012013-11-06 14:00:00 UTC to 2013-11-06 15:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsNov 6, 14:002013-11-06 15:00:00 UTC to 2013-11-06 16:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsNov 6, 15:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Nov 6, 14:002013-11-06 14:00:00 UTC2013-11-06 15:00:00 UTC110
Nov 6, 15:002013-11-06 15:00:00 UTC2013-11-06 16:00:00 UTC101

What Hacker News says

2 sources
I believe this is actually promoting an anti-pattern, and will result in code that is hard to test and which isn't expressly modular. From the source[1]: * core.js creates the "myLib" object * module1.js & module2.js augment "myLib" with additional properties * myLib.js takes the final, augmented object, and assigns it to a global variable There are many problems with this setup, but the main one is going to be that the module1.js/module2.js both alter the module defined by core.js. The augmentation is permanent (until page reload). So, what you end up with is a situation where you cannot include module1/module2 without first including core; this is not modular code and will make testing those modules more challenging and brittle -- you effectively can't test them independently. Rather, you'd have to test the relevant properties on the my
Read the rest
Lib object or stub-out myLib with a mock. When working with modules, you typically don't want to build up some giant, monolithic object -- rather, you should be pulling in modules as you need and using them independently. Each module should return it's own object, which you can freely use within the context of another module but which has no adverse side-effects on any other modules. 1. https://github.com/sahat/requirejs-library/tree/master/src
In Require.js Library Skeleton

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.