finallyd/bowowow 问题修复 & 功能扩展

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

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

finallyd/bowowow

Composer 安装命令:

composer require finallyd/bowowow

包简介

Import Bower dependencies automatically in to your HTML

README 文档

README

This is a thing to automatically load dependencies from Bower in to an HTML document without any manual work. Simply install something on the command line and it should auto load.

This is by no means a proper 'from the specs' app. I wrote it based upon what I was using from Bower so it is possible a package could appear that does not work with it.

Usage

It uses a sort of singleton style thing to make life easier in terms of dealing with instantiation.

To get an instance use:

#!php

\Bowowow\Bower::i()

Since the above returns an object you can access methods in the usual PHP way. The only really useful one is:

#!php

Bowowow\Bower::i()->load($type)

Which will return an array of paths to the files you need to include. For example:

#!php

foreach (Bowowow\Bower::i()->load('css') as $file) {
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$file\" />". PHP_EOL. "\t";
}

foreach (Bowowow\Bower::i()->load('js') as $file) {
    echo "<script type=\"text/javascript\" src=\"$file\"></script>". PHP_EOL. "\t";
}

To load the CSS and PHP.

License

It's BSD. Do what you want.

Contribution Guidelines

If you can fix anything go for it!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD
  • 更新时间: 2015-08-08