mape / connect-assetmanager

Middleware for Connect (node.js) for handling your static assets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does it support multiple JS assets?

vinkaga opened this issue · comments

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?

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