amitayd/grunt-browserify-jasmine-node-example

Make the project compatible with grunt-browserify 2

amitayd opened this issue · 2 comments

Many breaking changes were made in https://github.com/jmreidy/grunt-browserify .

  1. globs in external files (https://github.com/jmreidy/grunt-browserify)
  2. alias mapping is not supported (and no use of globs in alias) - see #2
  3. there seems to be some problem with using window globals for libraries such as underscore, which are loaded using require(). Might need to use something like browserify-shim.

Might be other problems as well.

Point number 3 doesn't seem to be an issue.

Points 1+2 can be resolved in a hacky way by expanding globs on the Grunt configuration.

A branch to resolve those issue was created at https://github.com/amitayd/grunt-browserify-jasmine-node-example/tree/grunt-browserify-version-2

Fixed problems with grunt-browserify version 2.0.

Since grunt-browserify does not currently use a globbing on "require" option, implementing the globbing in the grunt file (see expandFiles function).

For reference, kept https://github.com/amitayd/grunt-browserify-jasmine-node-example/tree/grunt-browserify-1.3 branch.