mooeypoo/mwstew-builder 问题修复 & 功能扩展

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

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

mooeypoo/mwstew-builder

Composer 安装命令:

composer require mooeypoo/mwstew-builder

包简介

A PHP backend to creating mediawiki extension files

README 文档

README

Build Status Coverage Status GitHub license

MWStew-builder: A backend PHP library for building MediaWiki extension files

Feel free to contribute!

Usage

This tool is available on packagist. Add it to your project with

composer install mooeypoo/mwstew-builder

To create MediaWiki extension files, you need to pass the required parameters to the Generator:

    // Send $data with the definition of required values for the extension
    $generator = new MWStew\Builder\Generator( $data );
    // The file structure is available by request
    $generator->getFiles();

The builder does not write files to the file system, it only builds the structure and lets you handle the rest.

Expected data

To make an extension bundle, the generator expects data with expected keys. The 'name' key is mandatory, all others are optional:

$data = [
  'name' => (string) Extension name; English only, no spaces (Mandatory)
  'title' => (string) Extension title or display name
  'author' => (string) Extension author
  'version' => (string|number) Extension version
  'description' => (string) A short description for the extension.
  'url' => (string) A URL for the extension
  'license' => (string) License code for the extension. Expected a valid value to be used in composer.json and package.json
  'dev_php' => (bool) Whether the extension should have the base files needed for a PHP development environment.
  'dev_js' => (bool) Whether the extension should have the base files needed for a JavaScript development environment.
  'specialpage_name' => (string) A name for a sepcial page. Must use valid characters for MediaWiki title.
  'specialpage_title' => (string) A title for the special page.
  'specialpage_intro' => (string) A short description or introduction text for the special page. This will appear at the top of the new special page that is created.
  'hooks' => (array) An array of strings representing hooks to be added to the system.
]

Using the files

You can then use the Zipper to add the files into a .zip file and output for download:

    $tempFolder = dirname( __DIR__ ) . '/temp';
    $zip = new MWStew\Builder\Zipper( $tempFolder, 'someName' );
    $zip->addFilesToZip( $generator->getFiles() );
    $zip->download();

Or you can create the fils on the file system yourself. To see an example of that, see MWStew-CLI for the command line tool.

Contribute

This is fully open source tool. Pull requests are welcome! Please participate and help make this a great tool!

If you have suggestions or bug reports, please submit an issue.

If you want to contribute to the code, clone and initialize locally:

  1. Clone the repo
  2. Run composer install
  3. Run composer run test to run tests
  • See MWStew for the graphical interface.
  • See MWStew-CLI for the command line tool.

Changelog

See CHANGELOG

Authors

Moriel Schottlender (mooeypoo)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2018-12-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固