aurelia / bundler

A library for bundling JavaScript, HTML and CSS for use with SystemJS.
MIT License
37 stars 25 forks source link

Can't bundle libraries with test coverage (lib-cov) folders #104

Closed bhaeussermann closed 8 years ago

bhaeussermann commented 8 years ago

Some libraries that we use have test coverage folders that are not included (and not needed) when installing them. This library's regular code is found in its lib folder (included) and the test coverage tracking version of the code is found in its lib-cov folder (not included).

These libraries are found containing code like this:

module.exports = process.env.EXPRESS_COV ? require('./lib-cov/express') : require('./lib/express');

My bundle task fails because aurelia-bundler tries to load the lib-cov folder which does not exist:

Error: ENOENT: no such file or directory, open 'C:\MyAureliaProject\wwwroot\lib\npm\express@3.4.8\lib-cov\express.js'

How about supporting ignore-patterns in the config dictionary so that these types of folders can be skipped?

I added "excludes": ["lib-cov/**/*"], which does not work.

ahmedshuhel commented 8 years ago

Excludes should work in this case. Can you give me a simple github repo that reproduces this behavior?

EisenbergEffect commented 8 years ago

Closing since the OP can use excludes.