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

Change require_tree to use project paths #2

Open
samsonasu opened this issue Mar 28, 2013 · 0 comments
Open

Change require_tree to use project paths #2

samsonasu opened this issue Mar 28, 2013 · 0 comments

Comments

@samsonasu
Copy link
Member

sprockets require_tree uses paths that are strictly relative to the file, which creates inconsistent behavior, i.e. for a directory structure like this:

  • app
    • controllers
      • some_controller.js
    • app.js
  • config
    • high_five
      • app-common.js
// This works:
//= require app/app.js
// This should work but doesn't: 
//= require_tree app/controllers
//  So we have to write the require_tree as such: 
//= require_tree ../../app/controllers

This might require either a patch to sprockets or a new directive processor, I'm not sure if the sprockets team would be open

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