本文整理汇总了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)
示例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)
示例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')
示例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'))