定制 dreadlabs/typo3-build 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

dreadlabs/typo3-build

Composer 安装命令:

composer require dreadlabs/typo3-build

包简介

A project for building and deploying TYPO3.CMS project.

README 文档

README

Encapsulates build targets in order to build a TYPO3.CMS project.

Note: these steps are very custom but necessary in order to have a clean composer structure within a TYPO3.CMS project.

But this is another story... For now, this is just a container in order to clean up my projects a bit.

Installation

Composer

Edit your composer.json and add the following line to your require-dev section:

{
  "require-dev": {
    "dreadlabs/typo3-build": "dev-master"
  }
}

Buildfile

Now fire up your favourite text editor and add a build.xml file to your projects root directory and add the following content:

<?xml version="1.0" encoding="UTF-8"?>
<project name="example" default="run">

  <import file="./vendor/dreadlabs/typo3-build/build.xml" />

  <target name="run">
    <phingcall target="build.main:run" />
  </target>
</project>

Please note, the name attribute of the project root element MUST NOT be set to ''build'' as this namespace is allocated by this package already.

Properties

In your project directory, you have to create a build.[stage].properties file. The stage value can be later addressed by specifying the environment property while executing the build targets.

As a minimum, the following properties must be set:

distDir=${application.startdir}/www

Secret properties

To protect some sensitive data of the public eye a build properties file must be created in the project's root directory: ''build.[stage].secret.properties''. This is the template if you want to use the shipped build scripts:

ssh.host=
ssh.user=
ssh.port=
remote.path=

database.name=
database.host=
database.password=
database.port=
database.username=

basic_auth.user=
basic_auth.password=

Usage

Build

~ $ cd /vagrant
~ $ php vendor/bin/phing -Denvironment=[dev|prod]

QA

The QA toolchain contains the following tools:

  • PHP Mess Detector
  • PHP_Depend
  • PHPLOC
  • PHP Copy/Paste Detector
  • PHP_CodeSniffer
  • PHPUnit
~ $ cd /vagrant
~ $ php vendor/bin/phing qa:run

Hooks

Currently, the following hooks are implemented.

typo3.copy-extensions.project.preCopyDist

This hook is executed right before copying the project extensions form src/ to ${distDir}/typo3conf/ext/.

Use this, to run grunt or other things which should treat your project extension before distribution.

Usage example

In your project build.xml you have to define the hook-target mappings as properties and add your custom task:

<property name="typo3.copy-extensions.project.preCopyDist" value="runGrunt" />

<target name="runGrunt">
   <exec
         command="/usr/bin/env grunt build"
         passthru="true"
         checkreturn="true" />
</target>

License

GPL-2.0

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2014-11-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固