承接 weprovide/aviate 相关项目开发

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

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

weprovide/aviate

最新稳定版本:0.0.2

Composer 安装命令:

composer require weprovide/aviate

包简介

Connector class for Aviate compiler

README 文档

README

Implementation of Aviate for PHP. Provided as base abstract class to extend for specific frameworks.

Installation

composer require weprovide/aviate

Example

<?php
namespace WeProvide\Aviate\CustomImplementation;

use WeProvide\Aviate\Aviate;

class Bridge extends Aviate {
    // Required function for you to implement. This should return the directory that has the aviate.config.js
    public function getProjectRoot(): string {
        return '/your-directory';
    }

    // Used for convience / demonstration. This is not required
    public function isDevelopment(): bool {
        return true;
    }

    // Return a nested array with Javascript and CSS files to be included into the page
    public function getFiles(): array {
        $types = parent::getFiles();

        if($this->isDevelopment()) {
            // In development css is injected from Javascript to provide hot reloading.
            $types['js'][] = $this->getDevServerUrl('css-file.js');
            return $types;
        }
        
        // In production we load an actual CSS file
        $types['css'][] = 'css-file.css';
        return $types;
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-06