承接 textpattern/installer 相关项目开发

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

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

textpattern/installer

Composer 安装命令:

composer require textpattern/installer

包简介

Textpattern plugin and theme installer

README 文档

README

Package directory | Issues

Install plugins and themes to Textpattern CMS with Composer dependency manager.

$ composer require rah/rah_replace

Why Composer?

Normally installing Textpattern plugins requires that you manually download an installation package, upload the package through your admin-panel, and then go through a multi-step installer process; rinse and repeat for every plugin, and when you need to update one.

With Composer, it's all managed through the dependency manager. Any theme or a plugin can be installed, updated or uninstalled, using a single command. This also comes with all the other Composer's benefits such as being able to commit your package manifesto under version control system and all of your project teammates will have the same set of plugins synced without any extra fiddling.

Quick start for end-users

After installing Composer to your host system that Textpattern is installed on, you can start adding plugins to Textpattern with Composer from command line.

First, head over to your Textpattern installation location, and tell Composer your Textpattern installation version by installing textpattern/lock meta-package:

$ cd /path/to/your/textpattern/installation/root
$ composer require textpattern/lock:4.6.2

After that, you can add any plugins and themes to your Textpattern installation like any other Composer packages:

$ composer require rah/rah_replace rah/rah_flat

Always run Composer commands in Textpattern installation directory, or in a directory right above it; the Composer installer supports installing Textpattern to a sub-directory, which would allow Textpattern to be within public HTTP server root directory, while Composer packages can be in a directory above it.

Quick start for developers

Plugins and themes are just like any other normal Composer package, but with a special type and a matching installer requirement in your composer.json. The package should be named after the plugin or the theme too. An example composer.json stub would look like the following:

{
  "name": "vendor/pfx_pluginname",
  "type": "textpattern-plugin",
  "require": {
      "textpattern/installer" : "*"
  }
}

Package types

Type Description
textpattern-plugin The package contains manifest.json formatted plugin sources. See an example plugin
textpattern-plugin-package The package contains collection of compiled plugin installer files. Any file that's name matches the format pfx_pluginname_v0.1.0.txt will be installed.
textpattern-admin-theme The package is an admin-side theme. See an example admin-theme.
textpattern-public-theme The package is a front-end theme

Internals

The installer works by scanning composer.json file's sibling and child directories for a Textpattern installation. If found, it injects the whole Textpattern application to the currently running Composer process. It then collects any plugins and themes from Composer packages and installs them, invoking plugin-lifecycle updaters and installers as needed. This process can be compatible with, and used by, any plugin or a theme.

The installer doesn't require any extra configuration from the end-user or the developer. All it needs is a functional Textpattern installation, located either in the same directory as the composer.json file or in a child directory. Just note that the system the Composer command is ran at, needs to have access to the database; take this in mind if you are, for instance, running the composer command outside a virtualized container.

Requirements

Development

See CONTRIBUTING.md

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2013-05-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固