mape / connect-assetmanager

Middleware for Connect (node.js) for handling your static assets.
MIT License
310 stars 48 forks source link

Subfolders and regular expressions don't work together #47

Open bnetter opened 11 years ago

bnetter commented 11 years ago

Hey guys,

I've been struggling for the past hour to get connect-assetmanager working with subfolders without any success. I'm basically trying to get all JS files inside my javascriptsfolder and subfolders as javascripts/controllers or javascripts/models.

So I have this path:

'path': __dirname + '/javascripts/',

And trying to use a regular expression like this:

'files': [/[a-z]+\/[a-z]+\.js/]

It always returns

No match for ...

I've been looking over the code and apparently this can't work with subfolders as I would expect it. If anyone is still looking over those issues and have a solution, I would really appreciate it since there's no alternative today to connect-assetmanager.

Thanks

matb commented 9 years ago

I have the same requirement and updated the implementation to support this behaviour. Please have a look at the pull request: https://github.com/mape/connect-assetmanager/pull/51