예제 #1
0
def assets(dev=False, watch=False):
    """Install and build static assets."""
    npm = 'npm install'
    if not dev:
        npm += ' --production'
    run(npm, echo=True)
    bower_install()
    build_js_config_files()
    # Always set clean=False to prevent possible mistakes
    # on prod
    webpack(clean=False, watch=watch, dev=dev)
예제 #2
0
파일: tasks.py 프로젝트: erinmayhood/osf.io
def setup():
    """Creates local settings, installs requirements, and generates encryption key"""
    copy_settings(addons=True)
    packages()
    requirements(addons=True, dev=True)
    encryption()
    from website.app import build_js_config_files
    from website import settings
    # Build nodeCategories.json before building assets
    build_js_config_files(settings)
    assets(dev=True, watch=False)
예제 #3
0
def setup():
    """Creates local settings, installs requirements, and generates encryption key"""
    copy_settings(addons=True)
    packages()
    requirements(addons=True, dev=True)
    encryption()
    from website.app import build_js_config_files
    from website import settings
    # Build nodeCategories.json before building assets
    build_js_config_files(settings)
    assets(dev=True, watch=False)
예제 #4
0
파일: tasks.py 프로젝트: keyz182/osf.io
def assets(dev=False, watch=False):
    """Install and build static assets."""
    npm = 'npm install'
    if not dev:
        npm += ' --production'
    run(npm, echo=True)
    bower_install()
    build_js_config_files()
    # Always set clean=False to prevent possible mistakes
    # on prod
    webpack(clean=False, watch=watch, dev=dev)