mozilla / connect-cachify

Express connect middleware to provide easy frontend caching for Node.js
Mozilla Public License 2.0
132 stars 21 forks source link

Even if minify=false, it uses minified file #39

Open bitliner opened 10 years ago

bitliner commented 10 years ago

My conf is like this:

var cachify = require('connect-cachify') app.use(cachify.setup( getAllWithPublicAsRoot() , { root: path.join(__dirname, 'public'), production: false })); where getAllWithPublicAsRoot returns an object like:

{ "/js/files.min.js":['/js/file1.js', '/js/file2.js'] } where js folder is in public folder.

But if I see the html code in the page, it puts in the html /js/files.min.js, not the corresponding files specified in the corresponding array.

I'm using connect-cachify 0.0.15

bitliner commented 10 years ago

Does anybody has the same problem?

bitliner commented 10 years ago

I found my problem. Specifically:

I solved adding in the options object a field myprefix. In this way the method prod_or_dev_tags can always understand how to serve properly asset files.

I didn't use the option url_to_paths because I had to specify too much stuff.

If it's worth to be integrated with the master repository let me know.