跳转到主要内容

zc.buildout配方,可编程地创建JSON文件

项目描述

nti.recipes.json

https://travis-ci.org/NextThought/nti.recipes.json.svg?branch=master https://coveralls.io/repos/github/NextThought/nti.recipes.json/badge.svg?branch=master

这是一个 zc.buildout 配方,可以编程地创建JSON文件

让我们通过一个buildout部分的示例来看看

[nodeserver-env]
recipe = nti.recipes.json
output-file = /home/user/etc/nodeserver-env.json
contents-section = nodeserver-env-root

[nodeserver-env-root]
stripe-section = nodeserver-stripe
jquery-payment-section = nodeserver-jquery.payment

[nodeserver-jquery.payment]
requires =
  jquery
  stripe
  **end-list**
url = https://my.server.com/libs/jquery.payment/1.3.2/jquery.payment.min.js
definesSymbol = jQuery.payment

[nodeserver-stripe]
url = https://js.stripe.com/v2/
definesSymbol = Stripe

/home/user/etc/nodeserver-env.json的输出将是

{
    "jquery-payment": {
                "definesSymbol": "jQuery.payment",
                "requires": [
                        "jquery",
                        "stripe"
                ],
                "url": "https://my.server.com/libs/jquery.payment/1.3.2/jquery.payment.min.js"
        },
        "stripe": {
                "definesSymbol": "Stripe",
                "url": "https://js.stripe.com/v2/"
        }
}

变更

1.0.0 (2018-02-19)

  • 第一个PyPI发布。

项目详情


下载文件

为您的平台下载文件。如果您不确定选择哪个,请了解更多关于 安装软件包 的信息。

源分布

nti.recipes.json-1.0.0.tar.gz (5.7 kB 查看哈希值)

上传时间: 源码

构建版本

nti.recipes.json-1.0.0-py2.py3-none-any.whl (7.3 kB 查看哈希值)

上传时间: Python 2 Python 3

由以下支持