Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes requirejs/r.js#591: resolve modules IDs in a package that end i…
…n .js without the .js
- Loading branch information
Showing
6 changed files
with
67 additions
and
2 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require({ | ||
packages: [{ | ||
name: 'foo', | ||
location: 'node_modules/foo', | ||
main: 'lib/index' | ||
}] | ||
}, ['foo'], function (foo) { | ||
|
||
doh.register( | ||
'packagesNode', | ||
[ | ||
function packagesNode(t){ | ||
t.is('foo', foo.name); | ||
t.is('bar', foo.bar.name); | ||
t.is('baz', foo.baz.name); | ||
t.is('bar', foo.baz.bar.name); | ||
} | ||
] | ||
); | ||
doh.run(); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>require.js: Packages Node-Style Test</title> | ||
<script type="text/javascript" src="../../require.js"></script> | ||
<script type="text/javascript" src="../doh/runner.js"></script> | ||
<script type="text/javascript" src="../doh/_browserRunner.js"></script> | ||
<script type="text/javascript" src="packagesNode-tests.js"></script> | ||
</head> | ||
<body> | ||
<h1>require.js: Packages Node-Style Test</h1> | ||
<p>Test package that uses ".js" node-style module ID references inside | ||
a package. More info: | ||
<a href="https://github.com/jrburke/r.js/pull/591">r.js 591</a></p> | ||
<p>Check console for messages</p> | ||
</body> | ||
</html> |