0.1.3 • Published 3 years ago

@paprika/build-translations v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@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.

OptionRequiredDefault
--out-dirfalseSame as <sourcePath>
--yaml-file-extfalseyml

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.

0.1.3-next.0

3 years ago

0.1.3

3 years ago

0.1.2

4 years ago

0.1.2-next.0

4 years ago

0.1.1

4 years ago

0.1.1-next.1

4 years ago

0.1.1-next.0

4 years ago