zeptech/conductor

dev-master 2014-08-28 14:52 UTC

This package is not auto-updated.

Last update: 2024-09-14 12:32:46 UTC


README

驾驶这趟列车...

Conductor 是一个 PHP+Javascript 的 Web 应用框架,为单页面、JavaScript 重量级应用提供特定支持。

先决条件

  • composer
  • node,npm
  • bower
  • grunt

安装

  1. 将其添加为 Composer 依赖项。(在 composer.json 中)

    {
        "require": {
            "zeptech/conductor": "dev-master"
        }
    }
    
  2. 运行 Composer 安装: composer install

  3. 运行 Conductor 初始化脚本: ./vendor/bin/cdt-init

    如果您收到无法更改组别的错误,请运行以下命令: sudo chgrp -R www-data target

  4. **安装 bower 依赖项

    $ cd vendor/zeptech/conductor
    $ bower install
    
  5. **运行 Grunt 构建

    $ cd vendor/zeptech/conductor
    $ npm install
    $ grunt
    

** 这些步骤将通过 composer install/update 钩子或在 cdt-init 脚本中消除。

配置

尽可能的情况下,Conductor 将提供/采用约定,以将配置保持到最小。然而,仍然需要少量配置来使用 Conductor 为您的网站提供动力。

Conductor 配置定义在您的网站根目录中的 YAML 文件 conductor.yml 中。

以下是一个示例配置文件,其中包含注释,说明每个配置值

# You can override the values of any block for different environments using
# an env block.

# This is display name for you site.
# It will appear as a prefix to each HTML page's <title> tag
title: My Awesome Site

# This is the root namespace where all of your sites PHP files are found.
namespace: mysite
 
# Database configuration.  All settings are required.
db:
  # Currently only MySQL is supported.  There are plans to also
  # support PostgreSQL and SQLite
  driver: mysql
  host: localhost
  username: mysite_d
  password: 123abc
  schema: mysite_d

  # When deploying your site to either staging, or production, the
  # values in the following blocks will be used.
  env:
    stage:
      schema: mysite_s
      username: mysite_s
      password: abc123
    prod:
      schema: mysite
      username: mysite
      password: !123@abc#

# This is web path from your server's domain to the root of your site.
# This value is optional and defaults to /
webRoot: /

# You can put an env block at any level
env:
  dev:
    webRoot: /mysite