Skip to content

Commit 9f8298a

Browse files
committed
Revises readme: updates description, adds build tools, link to jasmine testing samples, resources
1 parent e2e09c0 commit 9f8298a

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

README.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
##UMD (Universal Module Definition)
22

3-
The purpose of this repository is to formalize the work on UMDs - universal modules which can work anywhere,
4-
be it in the client, on the server or anywhere else. This pattern typically attempts to offer compatibility with the most popular script loaders of the day (e.g RequireJS
5-
amongst others), and in many cases uses AMD as a base, with special-casing added to handle
6-
CommonJS compatibility.
3+
This repository formalizes the design and implementation of the Universal Module Definition (UMD) API for JavaScript modules. These are modules which are capable of working everywhere, be it in the client, on the server or elsewhere.
74

8-
To date, a number of UMD variations have been proposed, ranging from Kit-Cambridge's
9-
[UMD](https://gist.github.com/1251221), through to [patterns](https://github.com/addyosmani/jquery-plugin-patterns/issues/1) discussed by Addy Osmani, Thomas Davis and Ryan Florence and most recently
10-
the UMD patterns proposed by [James Burke](https://gist.github.com/1262861).
5+
The UMD pattern typically attempts to offer compatibility with the most popular script loaders of the day (e.g RequireJS amongst others). In many cases it uses [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) as a base, with special-casing added to handle [CommonJS](http://wiki.commonjs.org/wiki/CommonJS) compatibility.
116

12-
13-
###Variations
7+
### Variations
148

159
####Regular Module
1610

@@ -59,6 +53,20 @@ is usable in AMD.
5953
Similar to nodeAdapter.js, but compatible with more CommonJS runtimes, and if
6054
you want to define a circular dependency.
6155

56+
### Tooling
57+
58+
#### Build tools
59+
60+
* [grunt-umd](https://github.com/alexlawrence/grunt-umd) is a [Grunt](http://gruntjs.com) task for surrounding JavaScript code with UMD boilerplate
61+
* [grunt-urequire](https://github.com/aearly/grunt-urequire) is a Grunt wrapper for [uRequire](https://github.com/anodynos/uRequire) a conversion tool for universal JavaScript modules.
62+
63+
#### Testing
64+
65+
* [Unit testing UMD with grunt-contrib-jasmine](http://stackoverflow.com/questions/16940548/grunt-test-for-umd)
66+
67+
###Resources
68+
69+
* [Browserify and the Universal Module Definition](http://dontkry.com/posts/code/browserify-and-the-universal-module-definition.html)
6270

6371
###Todos
6472

@@ -72,6 +80,9 @@ That is one of the strengths of module names, they can be mapped to different im
7280
* Further justifications for usage
7381
* Gotchas/custom-tweaks we're aware of, but would rather not apply to the default UMD boilerplate
7482

75-
###Influences
83+
### Influences
84+
85+
The basic pattern for the UMD variations in this repository was derived from the approach [@kriskowal](https://github.com/kriskowal) used for the [Q promise library](https://github.com/kriskowal/q).
7686

77-
The basic pattern for these UMD variations was derived from the approach [@kriskowal](https://github.com/kriskowal) used for the [Q promise library](https://github.com/kriskowal/q).
87+
Earlier UMD variations were also of influence, ranging from Kit-Cambridge's
88+
[UMD](https://gist.github.com/1251221), through to [patterns](https://github.com/addyosmani/jquery-plugin-patterns/issues/1) discussed by Addy Osmani, Thomas Davis and Ryan Florence and most recently the UMD patterns proposed by [James Burke](https://gist.github.com/1262861).

0 commit comments

Comments
 (0)