def build(): # ============================ # Very basic build # ============================ sed = Sed() help.replacer(sed) deepcopy(FileList("src", exclude = "*tests*"), Yak.paths['build'], replace = sed)
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)
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')
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'))