Skip to content

Commit

Permalink
fix AMD bundle by hacking around check in he module; closes #3000
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Sep 10, 2017
1 parent 337d317 commit 9a3ddeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/dedefine.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
*/

var through = require('through2');
var defineRx = /typeof define === ['"]function['"] && define\.amd/g;

var defineRx = /typeof\s+define\s*===?\s*['"]function['"]\s*&&\s*(?:define\.amd|typeof\s+define\.amd\s*===?\s*['"]object['"]\s*&&\s*define\.amd)/g;
function createStream () {
return through.obj(function (chunk, enc, next) {
this.push(String(chunk)
Expand Down
3 changes: 3 additions & 0 deletions scripts/travis-before-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

# bundle artifacts to AWS go here
mkdir -p .karma

# ensure we are building a non-broken bundle for AMD
make BUILDTMP/mocha.js && [[ -z "$(grep 'define.amd' BUILDTMP/mocha.js)" ]] || exit 1

0 comments on commit 9a3ddeb

Please sign in to comment.