@ember-intl/broccoli-cldr-data

中文文档
3.1.1发布于 2020/02/18MITCommonJS近 30 天下载 7万

extracts cldr data to a broccoli directory

此软件包已被标记为弃用

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

原始使用文档

broccoli-cldr-data

npm Version Build Status

Broccoli plugin for writing results of formatjs-extract-cldr-data to a broccoli node grouped by language.

var extract = require('broccoli-cldr-data');

extract(inputNode, {
  locales: ['fr-ca', 'en-ca'], /* defaults to all locales */
  moduleType: 'commonjs', /* options: commonjs, es6 */
  pluralRules: true, /* defaults to true */
  relativeFields: true, /* defaults to false */
  numberFields: true /* defaults to false */
});
// en.js
module.exports = [
{"locale":"en-CA","parentLocale":"en-001"},
{"locale":"en-001","parentLocale":"en"},
{"locale":"en","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?"one":n10==2&&n100!=12?"two":n10==3&&n100!=13?"few":"other";return n==1&&v0?"one":"other"}}];
// fr.js
module.exports = [
{"locale":"fr-CA","parentLocale":"fr"},
{"locale":"fr","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":"other";return n>=0&&n<2?"one":"other"}}
];

License

This software is free to use under the MIT license. See the LICENSE file for license text and copyright information.

The underlying formatjs-extract-cldr-data is licensed under the Yahoo Inc. BSD license. See the FormatJS license files for their license text and copyright information.

The CLDR data contained in this packaged is licensed under the Apache, ICU, and Unicode licenses. See the CLDR license files for their license text and copyright information.

版本与发布记录

@ember-intl/broccoli-cldr-data 共发布 4 个版本,首次发布于 2017/08/05;过去 12 个月发布了 0 个版本。

版本发布日期距今
3.1.1latest2020/02/186 年前
3.1.02018/11/177 年前
3.0.02018/11/088 年前
2.0.02017/08/059 年前

关于 @ember-intl/broccoli-cldr-data 的常见问题

@ember-intl/broccoli-cldr-data 是什么?

extracts cldr data to a broccoli directory注意:该包已被作者标记为弃用——Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

如何安装 @ember-intl/broccoli-cldr-data?

在项目目录运行 npm install @ember-intl/broccoli-cldr-data,或使用 pnpm add / yarn add / bun add。

@ember-intl/broccoli-cldr-data 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/ember-intl__broccoli-cldr-data 是否存在。

@ember-intl/broccoli-cldr-data 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@ember-intl/broccoli-cldr-data 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >= 6.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@ember-intl/broccoli-cldr-data 可以商用吗?

@ember-intl/broccoli-cldr-data 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@ember-intl/broccoli-cldr-data 的下载量有多少?

根据 npm 官方下载统计,@ember-intl/broccoli-cldr-data 在 2026/10/14 – 2026/11/12 这 30 天内被下载 70,090 次,日均约 2,336 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ember-intl/broccoli-cldr-data 还在维护吗?

最新版本 3.1.1 发布于 2020/02/18(6 年前);至今共发布 4 个版本,其中过去 12 个月发布了 0 个;首次发布于 2017/08/05。作者已将其标记为弃用,新项目建议寻找替代方案。