Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Script to inject prim to make updates easy
- Loading branch information
Showing
67 changed files
with
1,668 additions
and
5,183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +0,0 @@ | ||
alameda.min.js | ||
alameda.min.js.gz | ||
require.js | ||
testBaseUrl.js | ||
tests-requirejs | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,2 @@ | ||
LICENSE | ||
alameda.min.js.gz | ||
copyrequirejstests.sh | ||
require.js | ||
shrinktest.sh | ||
testBaseUrl.js | ||
tests | ||
tests-requirejs | ||
parts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,3 @@ | ||
#alameda | ||
#alameda-prim | ||
|
||
An AMD loader, like [requirejs](http://requirejs.org), but with the following | ||
implementation changes: | ||
|
||
* Assumes Promises are available in the JS environment. | ||
* Targets "modern" web browsers that implement standardized script.onload behavior: execute load listener right after script execution, something IE9 and below did not do. | ||
* Assumes browser support for Array.isArray, array extras, ES5 features. | ||
* Does not support a couple of less-used APIs (see tests section below). | ||
|
||
These changes means alameda is around 35% smaller than requirejs, 4.1 KB vs 6.4 KB, minified+gzipped sizes. | ||
|
||
Browser support: browsers that [natively provide Promises](http://caniuse.com/#feat=promises). If you need to support IE 10 and 11, the [alameda-prim](https://github.com/requirejs/alameda-prim) project includes a private promise shim. | ||
|
||
You can continue to use requirejs and the r.js optimizer for other scenarios. | ||
The r.js optimizer works well with alameda-based projects. | ||
|
||
## API | ||
|
||
alameda supports [the requirejs API](http://requirejs.org/docs/api.html). It even | ||
declares `requirejs`, to make passing the requirejs tests easier. alameda also | ||
has a good chance of becoming requirejs in a far-future requirejs version. | ||
|
||
## Running tests | ||
|
||
The tests are pulled from almond and requirejs. All tests should be served | ||
through a local web server, as the text loader plugin is used for some tests, | ||
and some browsers restrict local XHR usage when the files are served from | ||
a `file://` URL. | ||
|
||
### Bundled tests | ||
|
||
To run the tests that are just part of this repo, open `tests/index.html` in | ||
a web browser. | ||
|
||
### requirejs tests | ||
|
||
To run the requirejs tests, first make sure the following projects have been cloned and are **siblings** to the the alameda repo: | ||
|
||
* https://github.com/jrburke/requirejs | ||
* https://github.com/requirejs/domReady | ||
* https://github.com/requirejs/text | ||
* https://github.com/requirejs/i18n | ||
|
||
Then do the following: | ||
|
||
* symlink alameda.js to require.js | ||
* ./copyrequirejstests.sh | ||
|
||
#### requirejs tests that do not pass | ||
|
||
* require.undef()-related tests. | ||
* onResourceLoadNestedRequire: depends on implementing requirejs.onResourceLoad | ||
hook used for builds/some third party tools. This API is not required for normal | ||
module loading. | ||
|
||
## How to get help | ||
|
||
* Open issues in the [issue tracker](https://github.com/requirejs/alameda/issues). | ||
* Contact the [requirejs list](https://groups.google.com/group/requirejs). | ||
The [alameda](https://github.com/requirejs/alameda) AMD module loader but includes a private Promise shim if the JS environment does not provide one. This is mainly to support using alameda in IE 10 and 11. If that is not a requirement for your project, then use alameda. |
Oops, something went wrong.