Skip to content

Commit 6ed99a2

Browse files
committed
Build: Adds CommonJS-support in build process. Enhances PR jquery-validation#1597
1 parent 9153d43 commit 6ed99a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Gruntfile.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ banner = "/*!\n" +
2525
umdStart = "(function( factory ) {\n" +
2626
"\tif ( typeof define === \"function\" && define.amd ) {\n";
2727

28-
umdMiddle = "\t} else {\n" +
28+
umdMiddle = "\t} else if (typeof module === \"object\" && module.exports) {\n" +
29+
"\t\tmodule.exports = factory( require( \"jquery\" ) );\n" +
30+
"\t} else {\n" +
2931
"\t\tfactory( jQuery );\n" +
3032
"\t}\n" +
3133
"}(function( $ ) {\n\n";

0 commit comments

Comments
 (0)