{"_id":"@ember-intl/grunt-extract-cldr-data","_rev":"5-62d15c6b4173fdcefe2b4c1c24b5412e","name":"@ember-intl/grunt-extract-cldr-data","dist-tags":{"latest":"5.0.0"},"versions":{"5.0.0":{"name":"@ember-intl/grunt-extract-cldr-data","version":"5.0.0","keywords":["gruntplugin","cldr","data","i18n","intl","internationalization","locale","locales","localization"],"author":{"name":"Eric Ferraiuolo","email":"edf@ericf.me"},"license":"BSD","_id":"@ember-intl/grunt-extract-cldr-data@5.0.0","maintainers":[{"name":"buschtoens","email":"buschtoens@gmail.com"},{"name":"jasonmit","email":"jason.mitchell.w@gmail.com"},{"name":"snewcomer","email":"snewcomer24@gmail.com"}],"homepage":"https://github.com/ember-intl/formatjs-extract-cldr-data","bugs":{"url":"https://github.com/yahoo/grunt-extract-cldr-data/issues"},"dist":{"shasum":"ce60a138e3e42ee954a07cd5a27800f671486567","tarball":"https://registry.npmjs.org/@ember-intl/grunt-extract-cldr-data/-/grunt-extract-cldr-data-5.0.0.tgz","fileCount":8,"integrity":"sha512-NAg/LnUfW6heUaWAguPMFX7HFnfqL8tLdAzNKn0hph6F0vUBkiMcKs3SSLzfeXuscQuJUXTLrk4E4761/o9tDA==","signatures":[{"sig":"MEYCIQC7EMtSNCJSRH93CDqd6q1dEhLY2//ShF20CkIw4m56AgIhAIu6IITOD9ELsfk99X6lITUscdIEYKN66qf8iGlJAgiS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8X/9CRA9TVsSAnZWagAAluEP/1ofMTM0MAhEZNvFagG0\nnZbEkTpWcdYSBi3QtDqv2ZqJBghrHKgFw0Qe/SQzfUXaByBn6Hp8t6blUl28\nMBZo2YJh5Ah/q/Y8/fxhHuNEC8pwJAqX9vuOJWNVrlm/rYB3EmtHBUAKgciK\nSbV4u14YmvCriUADIjNucypD9NkTJ2O9wbtbxGUEq8UAyr2IjYQXfZLWo5wb\nKLId2dJ1WVW6AlJpLc73By6dzIW+rQxwIjxQmM3PetSJGAD/7ABjR1NLDGTH\nYhEvL8p9sQ+tpxadAXxGvzmZXAqwiSOmOmMQiWAQs3v3fhNtQ3IXWJF4uv/h\ntnRXWhvTXy3xFTSpzmGv2BbeTaDaouA6jg+Qqfgy/QmeFoWxeTI8gxFWqkR+\ntuW9dUK1Y1ByPR4lr//nt1aLmy1KCMLAERdc1eHmZnLrViuqIce20mXV/k1j\nh6Y2qrrs9NLhXW6GBk6UxFmYvA/IK2wuUcOpTH51k9NmGqX44UdKGAMZnKT9\n3rIp4FwkqJemcnM/oqHubAAkoPWq3qAmAW+tZHfgL4yr/c5glYmP2tKEL+I+\nbAfv0cTbkQkwvnjVm1lRrl1gBRz63X5tguFdGA3vlO2t7/qJ4iQvWOg11eQO\nB8qO6jIfw0ODQ27VeyNLzq7b36oDup8VN9/XXscDBxG1qp+cC+H+jphyEFG8\ngree\r\n=gdLB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"Gruntfile.js","engines":{"node":">= 6"},"gitHead":"97e918a1527369d5e2d25c6ce4ca846f5fe4968f","scripts":{"test":"grunt test"},"_npmUser":{"name":"snewcomer","email":"snewcomer24@gmail.com"},"repository":{"url":"git+https://github.com/ember-intl/formatjs-extract-cldr-data.git","type":"git"},"_npmVersion":"6.4.1","description":"Extract CLDR data and transform it for use in JavaScript.","directories":{"test":"test"},"_nodeVersion":"8.12.0","dependencies":{"serialize-javascript":"^1.0.0","@ember-intl/formatjs-extract-cldr-data":"^6.1.0"},"_hasShrinkwrap":false,"devDependencies":{"grunt":"^0.4.5","grunt-cli":"^0.1.13","jshint-stylish":"^1.0.0","load-grunt-tasks":"^3.1.0","grunt-contrib-clean":"^0.6.0","grunt-contrib-jshint":"^0.11.0","grunt-contrib-nodeunit":"^0.4.1"},"_npmOperationalInternal":{"tmp":"tmp/grunt-extract-cldr-data_5.0.0_1542553596582_0.09488823250967915","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-11-18T15:06:36.422Z","modified":"2026-04-01T18:00:25.376Z","5.0.0":"2018-11-18T15:06:36.739Z"},"bugs":{"url":"https://github.com/yahoo/grunt-extract-cldr-data/issues"},"author":{"name":"Eric Ferraiuolo","email":"edf@ericf.me"},"license":"BSD","homepage":"https://github.com/ember-intl/formatjs-extract-cldr-data","keywords":["gruntplugin","cldr","data","i18n","intl","internationalization","locale","locales","localization"],"repository":{"url":"git+https://github.com/ember-intl/formatjs-extract-cldr-data.git","type":"git"},"description":"Extract CLDR data and transform it for use in JavaScript.","maintainers":[{"email":"isaacjlee@hotmail.com","name":"ijlee2"},{"email":"jason.mitchell.w@gmail.com","name":"jasonmit"},{"email":"jan@buschtoens.me","name":"buschtoens"}],"readme":"# grunt-extract-cldr-data\n\n> Extract CLDR data and transform it for use in JavaScript. This a Grunt plugin for the [formatjs-extract-cldr-data][].\n\n[![npm Version][npm-badge]][npm]\n[![Build Status][travis-badge]][travis]\n[![Dependency Status][david-badge]][david]\n\n## Getting Started\nThis plugin requires Grunt.\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-extract-cldr-data --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-extract-cldr-data');\n```\n\n## The \"extract_cldr_data\" task\n\n### Overview\nIn your project's Gruntfile, add a section named `extract_cldr_data` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  extract_cldr_data: {\n    options: {\n      // Task-specific options go here.\n    },\n    your_target: {\n      // Target-specific file lists and/or options go here.\n    },\n  },\n})\n```\n\n### `dest`\n\nEach target must supply a `dest` property for the file path where the generated files should be outputted to. If `dest` is a directory, then a file will be generated per locale. If `dest` is a `.js` file, then _only one_ file will be generated and it will contain the data for all `options.locales`.\n\n### Options\n\n#### options.locales\nType: `Array`\nDefault value: All CLDR locales\n\nAn array of language tag strings strings for the locales to extract data for; e.g., `['en', 'fr', 'zh-Hant-HK', ...]`\n\n#### options.pluralRules\nType: `Boolean`\nDefault value: `false`\n\nWhether or not the `pluralRuleFunction` CLDR data should be extracted for each of the given `locales`.\n\n#### options.relativeFields\nType: `Boolean`\nDefault value: `false`\n\nWhether or not the relative-time `fields` CLDR data should be extracted for each of the given `locales`.\n\n#### options.prelude\nType: `String`\nDefault value: `\"\"`\n\nA string that will be prepended to each of the generated files. This can be a code comment, or actual JavaScript code.\n\n#### options.wrapEntry\nType: `Function`\nDefault value: `undefined`\n\nA function that will be passed a string of serialized data for each each `option.locales`. This function must return a string. This is useful for wrapping the locale data with JavaScript code; e.g., assigning it to a `var`.\n\n### Usage Examples\n\n#### Extract Plural Rule Functions\nIn this example, the CLDR plural rule functions for all locales will be extracted and output into a single file which wraps each locale's data in a function call:\n\n```js\ngrunt.initConfig({\n  extract_cldr_data: {\n    all: {\n      dest: 'locale-data/locales.js',\n      options: {\n        pluralRules: true,\n\n        prelude: [\n          '// GENERATED FILE',\n          'var IntlMessageFormat = require(\"intl-messageformat\");\\n\\n'\n        ].join('\\n'),\n\n        wrapEntry: function (serialized) {\n          return 'IntlMessageFormat.__addLocaleData(' + serialized + ');';\n        }\n      }\n    },\n  },\n})\n```\n\n#### Extract Fields and Plural Rule Functions\nIn this example, CLDR relative-time fields and plural rule functions for just English and French will be extracted and output into a one file per locale. Both of the locale's data is also wrapped in a function call:\n\n```js\ngrunt.initConfig({\n  extract_cldr_data: {\n    en_and_fr: {\n      dest: 'locale-data/',\n      options: {\n        locales       : ['en-US', 'fr-FR'],\n        pluralRules   : true,\n        relativeFields: true,\n\n        wrapEntry: function (serialized) {\n          return 'IntlRelativeFormat.__addLocaleData(' + serialized + ');';\n        }\n      }\n    },\n  },\n})\n```\n\n**Note:** The `locale-data/` directory will contain two files: `en.js`, and `fr.js`. This is because the hierarchy in the language tags is leveraged to de-duplicate data at the language level.\n\n## Contributing\nIn lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).\n\n## Release History\n- `1.0.0`: Initial release.\n- `1.0.1`: Update cldr package to fix issue with plural rule functions.\n- `1.1.0`: Update and lock-down cldr package to latest.\n- `2.0.0`: Refactored to use [formatjs-extract-cldr-data][].\n- `2.1.0`: Upgrade to `formatjs-extract-cldr-data@v1.1.0`.\n- `3.0.0`: Upgrade to `formatjs-extract-cldr-data@v2.0.0`.\n- `4.0.0`: Upgrade to `formatjs-extract-cldr-data@v4.0.0`.\n- `4.1.0`: Upgrade to `formatjs-extract-cldr-data@v4.1.0`.\n\n## License\nThis software is free to use under the Yahoo! Inc. BSD license.\nSee the [LICENSE file][LICENSE] for license text and copyright information.\n\n\n[formatjs-extract-cldr-data]: https://github.com/yahoo/formatjs-extract-cldr-data\n[npm]: https://www.npmjs.org/package/grunt-extract-cldr-data\n[npm-badge]: https://img.shields.io/npm/v/grunt-extract-cldr-data.svg?style=flat-square\n[travis]: https://travis-ci.org/yahoo/grunt-extract-cldr-data\n[travis-badge]: https://img.shields.io/travis/yahoo/grunt-extract-cldr-data/master.svg?style=flat-square\n[david]: https://david-dm.org/yahoo/grunt-extract-cldr-data\n[david-badge]: https://img.shields.io/david/yahoo/grunt-extract-cldr-data.svg?style=flat-square\n[LICENSE]: https://github.com/yahoo/grunt-extract-cldr-data/blob/master/LICENSE\n","readmeFilename":"README.md"}