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


Python Bundle.filters方法代码示例

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


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

示例1: _bundle_app_coffee

# 需要导入模块: from webassets import Bundle [as 别名]
# 或者: from webassets.Bundle import filters [as 别名]
def _bundle_app_coffee(env, debug=False):
    """Compile the apps coffeescript and bundle it into appname.js"""
    COFFEE_PATH = 'coffee'
    APP_PATH = path.join(COFFEE_PATH, 'appname')
    scripts = (
        path.join(COFFEE_PATH, 'nested.coffee'),
        path.join(COFFEE_PATH, 'app.coffee'),
        path.join(APP_PATH, 'app.coffee'),
        path.join(APP_PATH, 'menu.coffee'),
        path.join(APP_PATH, 'channel.coffee'),
        path.join(APP_PATH, 'contact.coffee'),
        path.join(APP_PATH, 'tag.coffee'),
        path.join(APP_PATH, 'person.coffee'),
        path.join(APP_PATH, 'vendor.coffee'),
        path.join(APP_PATH, 'activity.coffee'),
        path.join(APP_PATH, 'transaction.coffee'),
        path.join(APP_PATH, 'summary.coffee'),
        path.join(APP_PATH, 'router.coffee'),
    )

    all_js = Bundle(
        *scripts,
        filters='coffeescript',
        output=path.join('..', 'static', 'script', 'appname.js')
    )
    env.add(all_js)

    if not debug:
        all_js.filters = 'closure_js'
开发者ID:Workiva,项目名称:gae-financials,代码行数:31,代码来源:assets.py

示例2: _bundle_app_jsts

# 需要导入模块: from webassets import Bundle [as 别名]
# 或者: from webassets.Bundle import filters [as 别名]
def _bundle_app_jsts(app, env, debug=False):
    """Compile and bundle JSTs into template.js"""
    all_js = Bundle(
        path.join('templates', '**', '*.jst'), debug=False, filters='jst',
        output=path.join('..', '..', app, 'static', 'script', 'template.js')
    )
    env.add(all_js)

    if not debug:
        all_js.filters = 'closure_js'
开发者ID:EzoxSystems,项目名称:gae-skeleton,代码行数:12,代码来源:app_assets.py

示例3: _bundle_app_less

# 需要导入模块: from webassets import Bundle [as 别名]
# 或者: from webassets.Bundle import filters [as 别名]
def _bundle_app_less(env, debug):
    """Compile and minify appname's less files into appname.css."""
    bundle = Bundle(
        Bundle(path.join('less', 'appname.less'), filters='less'),
        output=path.join('..', 'static', 'css', 'appname.css')
    )

    if not debug:
        bundle.filters = 'cssmin'

    env.add(bundle)
开发者ID:Workiva,项目名称:gae-financials,代码行数:13,代码来源:assets.py

示例4: _bundle_app_less

# 需要导入模块: from webassets import Bundle [as 别名]
# 或者: from webassets.Bundle import filters [as 别名]
def _bundle_app_less(app, env, debug):
    """Compile and minify demo's less files into demo.css."""
    bundle = Bundle(
        Bundle(path.join('less', '%s.less' % (app.lower(),)), filters='less'),
        output=path.join('..', '..', app, 'static', 'css', '%s.css' % (app.lower(),))
    )

    if not debug:
        bundle.filters = 'cssmin'

    env.add(bundle)
开发者ID:EzoxSystems,项目名称:gae-skeleton,代码行数:13,代码来源:app_assets.py

示例5: _bundle_skel

# 需要导入模块: from webassets import Bundle [as 别名]
# 或者: from webassets.Bundle import filters [as 别名]
def _bundle_skel(app_path, env, debug=False):
    """Combine thrid party js libs into libs.js.

    For debug, they are left uncompressed.  For production the minified
    versions are used.  We suggest using the vendor supplied minified version
    of each library.
    """

    JS_LIB_PATH = path.join('js', 'lib')
    third_js = Bundle(
        path.join(JS_LIB_PATH, 'json2.js'),
        path.join(JS_LIB_PATH, 'jquery.js'),
        path.join(JS_LIB_PATH, 'underscore.js'),
        path.join(JS_LIB_PATH, 'backbone.js'),
        path.join(JS_LIB_PATH, 'backbone.paginator.js'),
        path.join(JS_LIB_PATH, 'bootstrap.js'),
        path.join(JS_LIB_PATH, 'bootstrap-typeahead-improved.js'),
        path.join(JS_LIB_PATH, 'date.js'),
    )

    #TOOD: add require so we can simplify this
    COFFEE_PATH = 'coffee'
    coffee_js = Bundle(
        path.join(COFFEE_PATH, 'nested.coffee'),
        path.join(COFFEE_PATH, 'app.coffee'),
        path.join(COFFEE_PATH, 'datagrid.coffee'),
        path.join(COFFEE_PATH, 'skel.coffee'),
        path.join(COFFEE_PATH, 'channel.coffee'),
        path.join(COFFEE_PATH, 'utils.coffee'),
        path.join(COFFEE_PATH, 'smartbox.coffee'),
        filters='coffeescript'
    )

    all_js = Bundle(
        third_js,
        Bundle(
            path.join('templates', '**', '*.jst'), filters='jst', debug=False),
        coffee_js,
        output=path.join(app_path, 'script', 'skel.js'))

    env.add(all_js)

    if not debug:
        all_js.filters = 'closure_js'
开发者ID:EzoxSystems,项目名称:gae-skeleton,代码行数:46,代码来源:skel_assets.py

示例6: _bundle_app_coffee

# 需要导入模块: from webassets import Bundle [as 别名]
# 或者: from webassets.Bundle import filters [as 别名]
def _bundle_app_coffee(app_path, env, debug=False):
    """Compile the apps coffeescript and bundle it into demo.js"""
    COFFEE_PATH = 'coffee'
    scripts = (
        path.join(COFFEE_PATH, 'nested.coffee'),
        path.join(COFFEE_PATH, 'app.coffee'),
        path.join(COFFEE_PATH, 'skel.coffee'),
        path.join(COFFEE_PATH, 'channel.coffee'),
        path.join(COFFEE_PATH, 'utils.coffee'),
    )
    all_js = Bundle(
        *scripts,
        filters='coffeescript',
        output=path.join(app_path, 'script', 'skel.js')
    )
    env.add(all_js)

    if not debug:
        all_js.filters = 'closure_js'
开发者ID:johnwlockwood,项目名称:gae-skeleton,代码行数:21,代码来源:skel_assets.py

示例7: _bundle_app_coffee

# 需要导入模块: from webassets import Bundle [as 别名]
# 或者: from webassets.Bundle import filters [as 别名]
def _bundle_app_coffee(app, env, debug=False):
    """Compile the apps coffeescript and bundle it into demo.js"""
    COFFEE_PATH = 'coffee'
    scripts = (
        path.join(COFFEE_PATH, 'app.coffee'),
        path.join(COFFEE_PATH, 'menu.coffee'),
        path.join(COFFEE_PATH, 'router.coffee'),
    )

    if not scripts:
        return

    all_js = Bundle(
        *scripts,
        filters='coffeescript',
        output=path.join('..', '..', app, 'static', 'script', '%s.js' % (app.lower(),))
    )
    env.add(all_js)

    if not debug:
        all_js.filters = 'closure_js'
开发者ID:EzoxSystems,项目名称:gae-skeleton,代码行数:23,代码来源:app_assets.py

示例8: _bundle_admin_js

# 需要导入模块: from webassets import Bundle [as 别名]
# 或者: from webassets.Bundle import filters [as 别名]
def _bundle_admin_js(env, debug=False):
    """Combine all js libs into sosadmin.js.

    For debug, they are left uncompressed.  For production the minified
    versions are used.  We suggest using the vendor supplied minified version
    of each library.
    """

    all_js = Bundle(
        _bundle_3rd_party_js(debug),
        #this needs to be debug false to handle recurisve templates
        Bundle(
            path.join('templates', '**', '*.jst'), filters='jst', debug=False),
        _bundle_admin_coffee(debug),
        output=path.join(
            '..', '..', APP_NAME, 'static', 'script', 'sosadmin.js')
    )

    env.add(all_js)

    if not debug:
        all_js.filters = 'closure_js'
开发者ID:SOSbeacon,项目名称:SchoolBeacon-GAE,代码行数:24,代码来源:app_assets.py


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