承接 galvani/coffee-closure 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

galvani/coffee-closure

Composer 安装命令:

composer require galvani/coffee-closure

包简介

README 文档

README

Symfony 2 bundle for coffee script support and google closure support

This package is dependent Michael's Bolin's coffee-script compiler

INSTALL

add these lines to composer.json:

"repositories": {
            "bolinfest/coffee-script": {

                    "type": "package",
                    "package": {
                            "name": "bolinfest/coffee-script",
                            "version": "1.1",
                            "source": {
                                    "url": "https://github.com/bolinfest/coffee-script.git",
                                    "type": "git",
                                    "reference": "origin/1.1.0"
                            }
                    }
            }
    }

register bundle in your AppKernel:

new Galvani\CoffeeClosureBundle\CoffeeClosureBundle()

add configuration options to your config:

coffee_closure:
	bin: "/usr/bin/env coffee"
	closure: "src/Galvani/PocketBoyBundle/Resources/public/js/"
	src: "src/Galvani/PocketBoyBundle/Resources/public/coffee"
	bundles: [ "GalvaniPocketBoyBundle" ]

The bundle will scan Resources/public/coffee and compile all .coffee files in Resources/public/js

Example of application entry point, which needs to be inside the Resources/public/js:

app.js:

goog.provide('app.start');

goog.require('goog.dom');
goog.require('pocketboy');

app.start = function() {
  var pocketboyApplication = new pocketboy();
  pocketboyApplication.start();
};

// Ensures the symbol will be visible after compiler renaming.
goog.exportSymbol('app.start', app.start);

and in you html simply add:

<script>goog.require('app.start'); app.start();</script>

twig example using assetic:

<script src="{{ asset('bundles/galvanipocketboy/js/closure-library/closure/goog/base.js') }}"></script>
<script src="{{ asset('bundles/galvanipocketboy/js/deps.js') }}"></script>
<script src="{{ asset('bundles/galvanipocketboy/js/app.js') }}"></script>

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-03-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固