Skip to content

Commit 41040b1

Browse files
author
Dominic Barnes
committed
adding component.json for Component.js support, adding commonjs require/export to jquery.expect.js
1 parent b9f68a8 commit 41040b1

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

component.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "jquery-expect",
3+
"repo": "Codeacademy/jquery-expect",
4+
"description": "DOM Assertion library",
5+
"keywords": [ "jQuery", "test", "DOM", "assertion", "expect" ],
6+
"version": "0.0.3",
7+
"license": "MIT",
8+
"main": "jquery.expect.js",
9+
"scripts": [ "jquery.expect.js" ],
10+
"dependencies": {
11+
"component/jquery": "*"
12+
}
13+
}

jquery.expect.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
return new Assertion(obj);
1313
}
1414

15+
if (window.require && !jQuery) {
16+
jQuery = $ = require("jquery");
17+
module.exports = $expect;
18+
}
19+
1520
/**
1621
* Utilities
1722
*/

0 commit comments

Comments
 (0)