Пример #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
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
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)