asset-rack
asset-rack copied to clipboard
Borks on system files
It'd be nice if the file listing code could ignore hidden files. E.g. the binary ".DS_Store" files that Finder.app on OS X creates keep making it upset:
[TypeError: my-project/public/css/.DS_Store:1
> 1| Buol_lg1_dsclbool_lg1Scompz�_moDDdutc�
@� @ @ @
E�DSDB @ @ @
Cannot read property 'type' of undefined
(This is in a rack.DynamicAssets with type: rack.StylusAsset and watch: true in case that makes a difference.)
I worked around this issue by using filter.
var assets = new rack.Rack([
new rack.DynamicAssets({ dirname: './public/styles', filter: '.scss', options: { compress: true, gzip: true }, type: rack.SassAsset, urlPrefix: '/styles' })
]);