instante/neon-configurator

Instante NEON 配置器是一个命令行工具,用于更新 NEON 文件。

dev-master 2017-03-14 12:58 UTC

This package is not auto-updated.

Last update: 2024-09-15 02:18:00 UTC


README

Build Status Downloads this Month Latest stable

使 neon 配置文件的更新变得非常简单。

包括作为 Kdyby\Console 命令的集成或通过 composer bin 中包含的简单 php 文件运行。

使用方法

<project root>$ vendor/bin/update-neon path/to/neon-file.neon path.to.key value
<project root>$ vendor/bin/update-neon app/config/local.neon parameters.webmasterEmail john@doe.com

字段类型被解析并作为 NEON 值写回。注意,shell 会消耗引号,因此如果您想实际插入一个字符串,则需要转义它们。例如

$ vendor/bin/update-neon demo.neon foo yes
$ vendor/bin/update-neon demo.neon bar "yes"
$ vendor/bin/update-neon demo.neon baz \"yes\"

结果是

foo: true
bar: true
baz: "yes"

要求

  • PHP 5.6 或更高版本
  • NEON 2.4

安装

安装 Instante neon-configurator 的最佳方法是使用 Composer

$ composer require instante/neon-configurator

注意事项

  • 当前此工具无法保留注释并会丢弃所有注释。