elepunk/oven 问题修复 & 功能扩展

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

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

elepunk/oven

Composer 安装命令:

composer require elepunk/oven

包简介

Files or directories scaffold tool

README 文档

README

Simple boilerplate generator for PHP 5.4 and above. Based on Indatus/Blacksmith package.

Installation

Install as global Composer package and add the global Composer bin directory to your PATH. composer global require "elepunk/oven=1.3.*@dev"

Updating Oven

To update Oven, you can use composer global update command.

Available Commands

Command Description
oven recipe:configure Set default recipes location
oven recipe:bake Generate codes by using recipe folder name

Usage

To start using Oven, you first need to create a new recipe.

Creating New Recipe

Create a new folder and create a new file called recipe.json.

{
    "name": "Sample Recipe",
    "ingredients": {
        "controller": {
            "source": "Controller/controller.php",
            "name": "(entity)Controller.php"
        },
        "processor": {
            "source": "Processor/processor.php",
            "name": "(entity).php"
        }
    }
}

All files that want to be created need to be specified under ingredients. Source like Controller/controller.php will be copied to the new destination.

Check out my sample recipe Oven Orchestra Recipe.

Running Oven

Generating specific item

oven bake --r="source/to/recipe.json" --d="your/destination/directory" Foobar controller

Generating the entire ingredients

oven bake --r="source/to/recipe.json" --d="your/destination/directory" Foobar

Organizing Your Recipes

Set the recipes location

oven recipe:configure /path-to-your-recipe-files

Create new recipes under the recipe location. Then generate the items

oven recipe:bake --d="your/destination/directory" recipe-template-directory-name Foobar controller

Available Options

--r="source-to-recipe-file"

This is to specify the location of the recipe file if you are in another directory. Default is the current directory.

--d="destination"

This will be the place where new files will be created. Default is the current directory.

--f

This will overwrite existing file

Available Template Variables

Variable Description Output
(entity) Studly cased entity name Foobar
(instance) Lower cased entity name foobar
(namespaces) Studly cased namespace Foo\Bar\Foobar

Changelogs

v1.3.0-dev

  • Deprecated oven bake command
  • oven recipe:bake recipe path can now be override using --recipe option
  • Added --ignore-namespace option to generate files in the same directory
  • Added oven recipe:skeleton command to create recipe boilerplate
  • Make the command options more readable
  • Overhaul the codebase to make it more testable
  • Added unit tests

v1.2.0

  • Bump to minimum PHP verion 5.4
  • Add global option to set default recipe directory
  • Enable oven to bake using template
  • Change errors to exceptions
  • Added list of files generated after success

v1.1.2

  • Add force option using --f
  • Add instance template variable

v1.1.1

  • Detect current working directory it is running from

v1.1.0

  • Fix vendor autoloading issue

v1.0.0

  • Initial release

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-08-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固