lastcall/mannequin-twig
Composer 安装命令:
composer require lastcall/mannequin-twig
包简介
Twig extension for the Mannequin template viewer
README 文档
README
Mannequin Twig is brought to you by your friends at Last Call Media, it is a command line application that you can use to visualize and work on your Twig Templates in the browser. For example, you might use it to work on the templates inside of a Symfony or Silex application.
Quick Start
Using Composer, install Mannequin Twig from your project root. From the command line:
$ composer require lastcall/mannequin-twig
Next, create a new .mannequin.php file in your project root. This file is where you will configure Mannequin. Inside of that file:
See all of the configuration options, or view an example project
Setting up Components
While the .mannequin.php file tells Mannequin where to find your components, you still need to describe them to Mannequin. To do that, we use a special YAML formatted comment block at the top of your twig files. For example, to describe a "Card" component living inside of card.html.twig, you would add the following at the top of the file:
{# @Component name: Card group: Molecule samples: Small: title: I am a small card body: Lorem ipsum... classes: ['small'] #} <div class="{{ classes|join(' ') }}"> ... </div>
See the full YAML reference here
Workflow
When you're ready to begin work on your templates, you can use the following worklow:
- Fire up a live development server so you can see your component. From the command line:
$ vendor/bin/mannequin start
- This will output a URL for the Mannequin UI. Visit it in your browser.
- In the UI, find the component you want to work on.
- Open the file, and make your changes.
- Reload the UI to see how your changes look.
lastcall/mannequin-twig 适用场景与选型建议
lastcall/mannequin-twig 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10.23k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 07 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 lastcall/mannequin-twig 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lastcall/mannequin-twig 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 10.23k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-07-15