chameleon

重磅!滴滴跨端框架Chameleon 1.0正式发布

萝らか妹 提交于 2019-11-30 18:43:02
导读:滴滴在 GitHub 上开源的跨端解决方案 Chameleon(简写 CML)正式发布 1.0 版本,中文名卡梅龙;中文意思变色龙,意味着就像变色龙一样能适应不同环境的企业级跨端整体解决方案,具有易用、轻量、面向未来等特点。下文将详细介绍 Chameleon 项目的研发背景和性能特点。 世界上最快乐的事,莫过于为理想而奋斗。—— 苏格拉底 历时 3 年的研发和实践,数十名团队成员的努力,数百名业界参与者的共建,数千次的改进优化,终于迎来了跨端解决方案 CML1.0 正式版。 1.前言 Chameleon(简写 CML )是一款真正专注于让一套代码运行多端的跨端框架,拥有业内先进的工程化设计,丰富的基础库,独创多态协议,提供标准的 MVVM 架构开发模式统一各类终端。 一经开源,CML 备受业界关注,长期占领 github tending 榜单,开发理念和框架设计得到了广泛开发者的认可。 但由于对部分细节缺乏充分思考,导致开源期间受到一些质疑。为此,我们深入调研业内的跨端框架,积极接纳开源社区的建议,经过 6 个月 180 次开发迭代,脚手架 tool 累计发布 70+ 日常版本,5090 次代码 commit;运行时框架 runtime 累计发布 40+ 日常版本,900 次代码 commit;Github issues 解决率达 83%,单测覆盖率超过 85%,PR 次数

Chameleon templates for javascript files?

ぃ、小莉子 提交于 2019-11-29 07:33:09
I am developing a simple pyramid application where I am using JQuery to do AJAX requests. I have until now had my javascript code within my chameleon templates. Now I want to extract my javascript into another location (e.g. as static resources). My problem is that I find my javascript code relies on dynamically generated content like so: $.post("${request.route_url('my_view')}",{'data': 'some data'}, function(html){ $("#destination").html(html); }); The dynamic element being: "${request.route_url('my_view')}" Which is calling the route_url method of the request object within the template. Is

How to use template inheritance with Chameleon?

纵然是瞬间 提交于 2019-11-29 01:53:52
I am using latest Pyramid to build a web app. Somehow we have started using Chameleon as the template engine. I have used Mako before and it was extremely simple to create a base template. Is this possible with chameleon as well? I have tried to look through the docs but I can not seem to find an easy solution. With Chameleon >= 2.7.0 you can use the "load" TALES expression. Example: main.pt: <html> <head> <div metal:define-slot="head"></div> </head> <body> <ul id="menu"> <li><a href="">Item 1</a></li> <li><a href="">Item 2</a></li> <li><a href="">Item 3</a></li> </ul> <div metal:define-slot=