Skip to content

Commit

Permalink
apply patch
Browse files Browse the repository at this point in the history
  • Loading branch information
thebjorn committed Jun 28, 2017
1 parent f8fb37d commit 4082248
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tasks.py
Expand Up @@ -71,8 +71,8 @@ def build_js(ctx, force=False):
for fname in JSX_FILENAMES:
jstools.babel(
ctx,
'{pkg.sourcedir}/js/' + fname,
'{pkg.staticdir}/{pkg.name}/js/' + fname + '.js',
'{pkg.source_js}/' + fname,
'{pkg.django_static}/{pkg.name}/js/' + fname + '.js',
force=force
)

Expand All @@ -85,12 +85,12 @@ def build(ctx, less=False, docs=False, js=False, force=False):
buildall = not specified

if buildall or less:
less_fname = ctx.pkg.sourcedir / 'less' / ctx.pkg.name + '.less'
less_fname = ctx.pkg.source_less / ctx.pkg.name + '.less'
if less_fname.exists():
lessc.LessRule(
ctx,
src='{pkg.sourcedir}/less/{pkg.name}.less',
dst='{pkg.staticdir}/{pkg.name}/css/{pkg.name}-{version}.min.css',
src='{pkg.source_less}/{pkg.name}.less',
dst='{pkg.django_static}/{pkg.name}/css/{pkg.name}-{version}.min.css',
force=force
)
elif less:
Expand All @@ -112,15 +112,15 @@ def watch(ctx):
"""
watcher = Watcher(ctx)
watcher.watch_directory(
path='{pkg.sourcedir}/less', ext='.less',
path='{pkg.source_less}', ext='.less',
action=lambda e: build(ctx, less=True)
)
watcher.watch_directory(
path='{pkg.sourcedir}/js', ext='.jsx',
path='{pkg.source_js}', ext='.jsx',
action=lambda e: build(ctx, js=True)
)
watcher.watch_directory(
path='{pkg.docsdir}', ext='.rst',
path='{pkg.docs}', ext='.rst',
action=lambda e: build(ctx, docs=True)
)
watcher.start()
Expand Down

0 comments on commit 4082248

Please sign in to comment.