Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Add prefix helper to js Module() class.
Browse files Browse the repository at this point in the history
  • Loading branch information
chromakode committed Jun 12, 2012
1 parent f48eb3b commit dcb85c6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions r2/r2/lib/js.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ def __init__(self, name, *sources, **kwargs):
sources = sources or (name,)
for source in sources:
if not isinstance(source, Source):
if 'prefix' in kwargs:
source = os.path.join(kwargs['prefix'], source)
source = FileSource(source)
self.sources.append(source)

Expand Down

0 comments on commit dcb85c6

Please sign in to comment.