mridang / magazine
Magazine 帮助您自动打包 Magento 1.x 的扩展
0.2
2017-03-28 09:15 UTC
Requires
- php: ^5.3.2 || ^7.0
- symfony/console: ^2.5 || ^3.0
This package is auto-updated.
Last update: 2024-08-27 13:32:12 UTC
README
Magazine 以一种合理的方式帮助您自动打包 Magento 1.x 的扩展。Magazine 使用被吸收的 Magento 核心类在几秒钟内为您构建一个完全符合标准的 Magento 包。
要求
Magazine 需要 PHP 版本 5.1.2 或更高版本。
安装
开始使用 Magazine 的最简单方法是使用 Composer。您可以使用以下命令轻松地将 Magazine 安装到系统范围内
composer global require "mridang/magazine=*"
确保您的 PATH 中包含 ~/.composer/vendor/bin/。
或者,您还可以在 composer.json 文件中包含 mridang/magazine 的依赖项。例如
{
"require-dev": {
"mridang/magazine": "0.*"
}
}
然后您可以从 vendor bin 目录运行 Magazine
./vendor/bin/magazine -h
您还可以下载 Magazine 源代码,并直接从 Git 检出运行 magazine 命令
git clone git://github.com/mridang/magazine.git
cd magazine
php bin/magazine -h
使用方法
为了向自动化打包迈进,您需要在扩展目录中创建一个 package.json 文件。这个 JSON 文件的格式与 Magento 打包器和扩展包中生成的 XML 文件格式非常相似。
大多数字段都是不言自明的,但 include 路径必须仔细配置。
{
"name": "Foobar",
"version": {
"release": "1.0.4"
},
"stability": {
"release": "beta"
},
"license": {
"_content": "OSL",
"attribs": {
"uri": "https://open-source.org.cn/licenses/osl-3.0.php"
}
},
"channel": "community",
"summary": "Foobar for Magento",
"description": "Foobar for Magento",
"notes": "Foobar for Magento",
"authors": {
"author": {
"name": "John Doe",
"user": "j.doe",
"email": "john.doe@example.com"
}
},
"date": "2015-01-22",
"time": "21:13:05",
"dependencies": {
"required": {
"php": {
"min": "5.2.0",
"max": "7.0.0"
}
}
},
"include": {
"magelocal": [] ,
"magecommunity": [
"app/code/community/Foo/Bar/*"
],
"magecore": [],
"magedesign": [],
"mageetc": [],
"magelib": [],
"magelocale": [],
"magemedia": [],
"mageskin": [],
"mageweb": [],
"magetest": [],
"mage": []
},
"exclude": [
"vendor",
"*.json",
"*.lock",
"*.tar"
]
}
作者
Mridang Agarwalla
许可证
Magazine 根据 MIT 许可证授权 - 有关详细信息,请参阅 LICENSE 文件。