Socket
Socket
Sign inDemoInstall

@paprika/build-translations

Package Overview
Dependencies
9
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @paprika/build-translations

An utility tool to convert translation yml files to js.


Version published
Weekly downloads
352
increased by10%
Maintainers
3
Install size
3.35 MB
Created
Weekly downloads
 

Readme

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

Last updated on 30 Apr 2022

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc