@paprika/build-translations
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

@paprika/build-translations

Description

Utility tool. Converting yml/yaml files to js files.

Usage

run from CLI

# Using yarn:
yarn global add @paprika/build-translations --dev
build-translations <sourcePath> --out-dir <outPath> --yaml-file-ext yml
# Or via npx:
npx @paprika/build-translations <sourcePath> --out-dir <outPath> --yaml-file-ext yml

Options

<sourcePath> will be default to current path.

Option Required Default
--out-dir false Same as <sourcePath>
--yaml-file-ext false yml

with node

yarn add @paprika/build-translations --dev

in your file

import buildTranslations from "@paprika/build-translations";

// default values are same with running from CLI
buildTranslations({
  sourcePath: "./src/locale",
  outputPath: "./src/locale-js",
  yamlFileExtension: "yaml",
});

Notes

There's no tests for this tool yet, we were going to add some, but it's unpossible to mock process.cwd() in jest, see facebook/jest#5146.

Readme

Keywords

none

Package Sidebar

Install

npm i @paprika/build-translations

Weekly Downloads

392

Version

0.1.3

License

MIT

Unpacked Size

20.9 kB

Total Files

10

Last publish

Collaborators

  • vkhimich
  • mikrotron
  • jamiek-galvanize
  • allison_cc