🚀 Socket Launch Week 🚀 Day 2: Introducing Repository Labels and Security Policies.Learn More
Socket
Sign inDemoInstall
Socket

@paprika/build-translations

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paprika/build-translations

An utility tool to convert translation yml files to js.

0.1.3
latest
Source
npm
Version published
Maintainers
3
Created
Source

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

FAQs

Package last updated on 30 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts