예제 #1
0
def watch_docs(path="./docs/", src_path=None, command="make html"):
    import fabuild as fb

    watch_files = [
        dict(match="*.rst", ignore="*_build*", path=path),
    ]
    if src_path:
        watch_files.append(dict(match="*.py", path=src_path))

    build_fn = functools.partial(build_docs, path=path, command=command)
    fb.watch(build_fn, "./", files=watch_files, recursive=True)
예제 #2
0
def watch():
    import fabuild as fb
    from functools import partial

    if not os.path.exists("./build"):
        os.mkdir("./build")

    fb.clean(files=dict(path="./build"))
    fb.coffee(files=dict(path="./static"), output="./build", watch=True)

    fb.jade(files=dict(path="./templates"), out="./build", watch=True)
    fb.stylus(files=dict(path="./static"), out="./build", watch=True)
    concat_fn = partial(fb.concat, files=dict(path="./build", match="*.js"), output="./build/compiled.js")
    fb.watch(concat_fn, "./build", files=["./build/test1.js", "./build/test2.js"])
예제 #3
0
파일: fabfile.py 프로젝트: rothnic/nickroth
def regenerate():
    """Automatically regenerate site upon file modification"""
    import fabuild as fb
    fb.watch(build, os.path.join(env.project_dir, 'content'))