karma-commonjs icon indicating copy to clipboard operation
karma-commonjs copied to clipboard

Fails on modules with a shebang

Open jamesshore opened this issue 10 years ago • 1 comments

If you require a module that starts with a shebang, such as #! /usr/bin/node, the code will fail with a syntax error. This is because karma-commonjs inserts its wrapper in front of the shebang, which leads to invalid code.

We should look for the presence of a shebang line and add our wrapper below it when it's present.

jamesshore avatar Feb 09 '15 02:02 jamesshore

Oh, this is a valid one... and should be relatively easy to fix!

pkozlowski-opensource avatar Feb 09 '15 03:02 pkozlowski-opensource