Skip to content

Commit a9e610e

Browse files
committed
fix AMD bundle by hacking around check in he module; closes #3000
1 parent 337d317 commit a9e610e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

scripts/dedefine.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
*/
77

88
var through = require('through2');
9-
var defineRx = /typeof define === ['"]function['"] && define\.amd/g;
10-
9+
var defineRx = /typeof\s+define\s*===?\s*['"]function['"]\s*&&\s*(?:define\.amd|typeof\s+define\.amd\s*===?\s*['"]object['"]\s*&&\s*define\.amd)/g;
1110
function createStream () {
1211
return through.obj(function (chunk, enc, next) {
1312
this.push(String(chunk)

scripts/travis-before-script.sh

+3
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22

33
# bundle artifacts to AWS go here
44
mkdir -p .karma
5+
6+
# ensure we are building a non-broken bundle for AMD
7+
make BUILDTMP/mocha.js && grep -n 'define.amd' BUILDTMP/mocha.js && exit 1

0 commit comments

Comments
 (0)