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


Python Helpers.replacer方法代码示例

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


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

示例1: build

# 需要导入模块: from helpers import Helpers [as 别名]
# 或者: from helpers.Helpers import replacer [as 别名]
def build():
  # ============================
  # Very basic build
  # ============================

  sed = Sed()
  help.replacer(sed)
  deepcopy(FileList("src", exclude = "*tests*"), Yak.paths['build'], replace = sed)
开发者ID:pombredanne,项目名称:airstrip.js,代码行数:10,代码来源:pukefile.py

示例2: tests

# 需要导入模块: from helpers import Helpers [as 别名]
# 或者: from helpers.Helpers import replacer [as 别名]
def tests():
  # ============================
  # Build tests
  # ============================
  sed = Sed()
  help.replacer(sed)

  list = FileList(Yak.paths['tests'], filter="*.js,*.html,*.css")
  deepcopy(list, Yak.paths['build'] + '/tests', replace=sed)
开发者ID:pombredanne,项目名称:airstrip.js,代码行数:11,代码来源:pukefile.py

示例3: build

# 需要导入模块: from helpers import Helpers [as 别名]
# 或者: from helpers.Helpers import replacer [as 别名]
def build():
  # ============================
  # Very basic build
  # ============================

  sed = Sed()
  help.replacer(sed)
  # deepcopy(FileList("src", exclude = "*tests*"), Yak.paths['build'], replace = sed)

  libs = FileList('src', filter="*namespace.js", exclude="*shims*")
  libs.merge(FileList('src', filter="*.js", exclude="*namespace.js,*shims*"))
  combine(libs, Yak.paths['build'] + '/phoneapp.js')
开发者ID:jsBoot,项目名称:phoneapp.js,代码行数:14,代码来源:pukefile.py

示例4: build

# 需要导入模块: from helpers import Helpers [as 别名]
# 或者: from helpers.Helpers import replacer [as 别名]
def build():

  sed = Sed()
  help.replacer(sed)

  sh('compass compile src')

  app = FileList('src/app', filter="*root.js")
  app.merge(FileList('src/app', filter="*.js", exclude="*root.js"))
  combine(app, FileSystem.join(Yak.paths['build'], 'js/app.js'))

  knownHelpers = [
    'action',
    'bind',
    'bindAttr',
    'collection',
    'each',
    'if',
    'log',
    'outlet',
    'unless',
    'view',
    'with'
  ]

  helperCmd = ''
  for helper in knownHelpers:
    helperCmd += '-k %s ' % helper

  stf = Std()
  sh('handlebars src/app/templates -r src/app/templates -f .build/js/templates.js %s' % helperCmd, header="build templates", std = stf)
  if stf.err:
    console.fail("PROUT")

  deepcopy('src/index.html', Yak.paths['build'])

  deepcopy('src/assets/images', FileSystem.join(Yak.paths['build'], 'images'))

  fontcss = FileList('src/assets/fonts/', filter="*.css")
  combine(fontcss, FileSystem.join(Yak.paths['build'], 'fonts/pictos.css'))

  # pictos = FileList('src/assets/fonts/generated', exclude="*.css")
  # deepcopy(pictos, FileSystem.join(Yak.paths['build'], 'fonts'))

  fonts = FileList('src/assets/fonts/signika')
  deepcopy(fonts, FileSystem.join(Yak.paths['build'], 'fonts'))

  # Phonegap is still needed on desktop
  libs = FileList('src/lib/phonegap/ios', filter="*.js")
  libs.merge(FileList('src/lib/phonegap/plugins', filter="*.js"))
  combine(libs, FileSystem.join(Yak.paths['build'], 'js', 'phonegap.js'))
开发者ID:BensonXiong,项目名称:mobile-app,代码行数:53,代码来源:pukefile.py


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