Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@formatjs/cli

Package Overview
Dependencies
Maintainers
0
Versions
262
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formatjs/cli

A CLI for formatjs.

  • 6.3.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created

What is @formatjs/cli?

@formatjs/cli is a command-line tool for internationalizing JavaScript applications. It provides functionalities for extracting, compiling, and managing translation messages, making it easier to handle localization in your projects.

What are @formatjs/cli's main functionalities?

Extract Messages

This command extracts all the translation messages from the JavaScript files in the 'src' directory and outputs them to a JSON file named 'en.json'.

npx formatjs extract 'src/**/*.js' --out-file lang/en.json

Compile Messages

This command compiles the extracted messages from 'en.json' into a format that can be used by the application, outputting the result to 'en-compiled.json'.

npx formatjs compile lang/en.json --out-file lang/en-compiled.json

Compile Messages with Pseudo-Localization

This command compiles the messages with pseudo-localization, which is useful for testing how the application handles different languages and character sets. The output is saved to 'en-pseudo.json'.

npx formatjs compile lang/en.json --pseudo-locale --out-file lang/en-pseudo.json

Format Messages

This command formats the extracted messages in 'en.json' to ensure consistency and readability, saving the formatted messages to 'en-formatted.json'.

npx formatjs format lang/en.json --out-file lang/en-formatted.json

Other packages similar to @formatjs/cli

Keywords

FAQs

Package last updated on 18 Nov 2024

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc