mape / connect-assetmanager

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

Does it support multiple JS assets? #19

Closed vinkaga closed 12 years ago

vinkaga commented 13 years ago

I've been trying to build two separate JS assets for separate pages like the following

var assetManagerGroups = { 'js': { 'route': /\/static\/js\/[0-9]+\/..js/ , 'path': './public/js/' , 'dataType': 'javascript' , 'files': [ 'jquery.js' , 'jquery.client.js' ] } , 'js2': { 'route': /\/static\/js\/[0-9]+\/..js/ , 'path': './public/js/' , 'dataType': 'javascript' , 'files': [ 'jquery.js' ] } };

It generates separate hashes for the js and js2 assets but the contents of js2 seem to be the same as that of js (always the first entry in list). What am I doing wrong?

vinkaga commented 12 years ago

The mistake I was making was that the two route patterns need to be not match each other. Then it works.