Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
master: prefix paths in views.php #8546
Let's say we allow this in views.php:
'prefix/' => __DIR__ . '/vendors/prefix/dist',
A few problems:
Would it compromise this feature to limit scanning to the given directory? I.e. you might have to do this:
'prefix/' => __DIR__ . '/vendors/prefix/dist', 'prefix/images/' => __DIR__ . '/vendors/prefix/dist/images',
Original motivation for prefixes was to be able to include the source of an entire AMD library like jquery or dojo into views very easily.
I think not doing this recursively by default would make this use case significantly more painful.
If folks want to only include a single directory depth, they can just provide a custom callback as you have done. Php has some helpers for this like