Skip to content

Change require_tree to use project paths #2

@samsonasu

Description

@samsonasu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions