Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamicAssets doesn't work with JavascriptAsset #121

Open
SimeonC opened this issue Feb 7, 2014 · 0 comments
Open

DynamicAssets doesn't work with JavascriptAsset #121

SimeonC opened this issue Feb 7, 2014 · 0 comments

Comments

@SimeonC
Copy link

SimeonC commented Feb 7, 2014

If I do the following:

new rack.DynamicAssets
    type: rack.JavascriptAsset
    urlPrefix: '/assets/js'
    dirname: __dirname + '/assets/coffeescript'
    filter: '.coffee'

I get this error:

/Users/simeon/Sites/LOL Team Balancer/node_modules/async/lib/async.js:129
        if (!arr.length) {
                ^
TypeError: Cannot read property 'length' of undefined
  at Object.async.eachSeries (/Users/simeon/Sites/LOL Team Balancer/node_modules/async/lib/async.js:129:17)
  at JavascriptAsset.exports.JavascriptAsset.JavascriptAsset.create (/Users/simeon/Sites/LOL Team Balancer/node_modules/asset-rack/compiled/modules/javascript.js:41:20)
  at /Users/simeon/Sites/LOL Team Balancer/node_modules/asset-rack/compiled/asset.js:153:24
  at process._tickCallback (node.js:415:13)

As far as I can tell is that the JavascriptAsset needs an array of codes, and DynamicAssets isn't passing it in that. Have I missed something about this or should it work? I kinda was trying to avoid writing in all the files I wanted to be served as JS...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant