当前位置: 首页>>代码示例>>Python>>正文


Python Environment.manifest方法代码示例

本文整理汇总了Python中webassets.Environment.manifest方法的典型用法代码示例。如果您正苦于以下问题:Python Environment.manifest方法的具体用法?Python Environment.manifest怎么用?Python Environment.manifest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在webassets.Environment的用法示例。


在下文中一共展示了Environment.manifest方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _setup_env

# 需要导入模块: from webassets import Environment [as 别名]
# 或者: from webassets.Environment import manifest [as 别名]
def _setup_env(debug=True, cache=True):
    """Setup the webassets environment."""
    env = Environment(INPUT_FILES, OUTPUT_FILES)
    # We use underscore's templates by default.
    env.config['JST_COMPILER'] = '_.template'
    if debug:
        env.config['CLOSURE_COMPRESSOR_OPTIMIZATION'] = 'WHITESPACE_ONLY'
        env.manifest = False
    else:
        env.config['CLOSURE_COMPRESSOR_OPTIMIZATION'] = 'ADVANCED_OPTIMIZATIONS'

    env.debug = False
    env.cache = cache

    #javascript
    _bundle_app_jsts(env, debug)
    _bundle_app_coffee(env, debug)
    _bundle_3rd_party_js(env, debug)

    #css
    _bundle_app_less(env, debug)
    _bundle_3rd_party_css(env, debug)

    #images
    _bundle_images(env)

    return env
开发者ID:Workiva,项目名称:gae-financials,代码行数:29,代码来源:assets.py

示例2: _setup_env

# 需要导入模块: from webassets import Environment [as 别名]
# 或者: from webassets.Environment import manifest [as 别名]
def _setup_env(app='', debug=True, cache=True):
    """Setup the webassets environment."""
    if app:
        app_path = path.join('..', '..', app, 'static')
        env = Environment(
            path.join(INPUT_FILES, '..', '..', 'skel', 'assets'),
            path.join(BASE_LOCATION, '..'))
    else:
        app_path = path.join('..', 'static')
        env = Environment(
            path.join(INPUT_FILES, '..', '..', 'skel', 'assets'),
            path.join(BASE_LOCATION))

    # We use underscore's templates by default.
    env.config['JST_COMPILER'] = '_.template'
    if debug:
        env.config['CLOSURE_COMPRESSOR_OPTIMIZATION'] = 'WHITESPACE_ONLY'
        env.manifest = False
    else:
        env.config['CLOSURE_COMPRESSOR_OPTIMIZATION'] = 'ADVANCED_OPTIMIZATIONS'

    env.debug = False
    env.cache = cache

    #javascript
    _bundle_app_coffee(app_path, env, debug)
    _bundle_3rd_party_js(app_path, env, debug)

    #css
    _bundle_3rd_party_css(app_path, env, debug)

    #images
    _bundle_images(app, env, is_skel=True)

    return env
开发者ID:johnwlockwood,项目名称:gae-skeleton,代码行数:37,代码来源:skel_assets.py

示例3: _set_env

# 需要导入模块: from webassets import Environment [as 别名]
# 或者: from webassets.Environment import manifest [as 别名]
def _set_env(debug=True, cache=False):
    env = Environment(BASE_PATH)

    if debug:
        env.manifest = False

    env.cache = cache

    return env
开发者ID:lyddonb,项目名称:spicolis,代码行数:11,代码来源:build.py

示例4: Environment

# 需要导入模块: from webassets import Environment [as 别名]
# 或者: from webassets.Environment import manifest [as 别名]
#!/usr/bin/env python
from os import path
from webassets import Bundle, Environment

env = Environment(path.join(path.dirname(__file__), 'static'), '/stylesheets')
# App Engine doesn't support automatic rebuilding.
env.auto_build = False
# This file needs to be shipped with your code.
env.manifest = 'file'

bundle = Bundle('in.css', filters="cssmin", output="out.css")
env.add(bundle)


if __name__== "__main__":
    # If this file is called directly, do a manual build.
    bundle.build()
开发者ID:0x1997,项目名称:webassets,代码行数:19,代码来源:assets.py

示例5: Environment

# 需要导入模块: from webassets import Environment [as 别名]
# 或者: from webassets.Environment import manifest [as 别名]
import os

from werkzeug.wrappers import Request, Response
from werkzeug.wsgi import SharedDataMiddleware

from webassets import Environment, Bundle, ExternalAssets

environment = Environment('static', '/static')

environment.versions = 'hash'
manifest_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '.static-manifest'))
environment.manifest = 'file://%s' % manifest_path
environment.cache = False
environment.auto_build = True
environment.url = '//0.0.0.0:5001/static/'
#environment.debug = True

#less = Bundle('less/main.less', filters='less', output='gencss/less.css')

css = Bundle(
    Bundle('less/main.less', filters='less', output='gencss/less.css'),
    'css/main.css',
    'css/sub/sub-main.css',
    filters='cssrewrite',
    output='gencss/css-merged.%(version)s.css'
)

external_solo = ExternalAssets('map.png')

external_main = ExternalAssets(
    'css/img/*',
开发者ID:eadmundo,项目名称:webassets-versioned-images,代码行数:33,代码来源:standalone.py


注:本文中的webassets.Environment.manifest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。