Beispiel #1
0
def build():
    import fabuild as fb

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

    fb.clean(files=dict(path="./build"))
    fb.coffee(files=dict(path="./static"), output="./build")
    fb.concat(files=dict(path="./build", match="*.js"), output="./build/compiled.js")
    fb.jade(files=dict(path="./templates"), out="./build")
    fb.stylus(files=dict(path="./static"), out="./build")
Beispiel #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"])