headzoo/polymer-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

headzoo/polymer-bundle

最新稳定版本:0.0.5.1

Composer 安装命令:

composer require headzoo/polymer-bundle

包简介

Symfony bundle and Twig extension for developing and deploying Polymer web components.

README 文档

README

Symfony bundle and Twig extension for developing and deploying Polymer web components.

Build Status Documentation MIT License

Polyphonic Symfony

This bundle is no where near production ready. Use at your own risk.

The purpose of this bundle is making it easier to use and build Polymer web components within a Symfony project. Polyphonic handles the problems that come up when trying to build and use web components within Twig templates.

Example Element

A simple example of using the {% polymer element %} Twig tag to create a custom <hello-world><hello-world> element. This element displays "Hello, World!" by default, but the message can be changed by setting the name attribute.

Note that there's no need to add <link rel="import" href="polymer/polymer.html"> as the import statement is added automatically. The template is saved in the bundle directory at Resources/public/elements/hello-world/hello-world.html.twig.

{% polymer element "hello-world" attributes="name" %}
    <template>
        <p>Hello, {{name}}!</p>
    </template>
    <script>
        Polymer({
            name: "World"
        });
    </script>
{% endpolymer %}

Using the element in your views:

{% polymer import "@AcmeBundle:hello-world/hello-world.html.twig" %}

<!-- Displays "Hello, World!" -->
<hello-world></hello-world>

<!-- Displays "Hello, Pascal!" -->
<hello-world name="Pascal"></hello-world>

Requirements

PHP 5.5.*
Symfony 2.6.*

Installing

Add headzoo/polymer-bundle to your composer.json requirements.

"require": {
    "headzoo/polymer-bundle": "0.0.3"
}

Run composer update and then add the bundle your AppKernel.php.

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
            ...
            new Headzoo\Bundle\PolymerBundle\PolymerBundle(),
        )
        
        return $bundles;
    }
}

Add the following route to your app/config/routing_dev.yml file.

polymer:
	resource: "@PolymerBundle/Resources/config/routing.yml"
	prefix:   /_polymer

Next: Read the full documentation

统计信息

  • 总下载量: 87
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 4
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固