Socket
Socket
Sign inDemoInstall

@intl-schematic/cli

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @intl-schematic/cli

`npm i -D @intl-schematic/cli`


Version published
Weekly downloads
22
increased by144.44%
Maintainers
1
Install size
32.1 kB
Created
Weekly downloads
 

Readme

Source

@intl-schematic/cli (WIP)

npm i -D @intl-schematic/cli

intl-schematic, as well as its plugins, defines a JSON-schema API designed specifically to allow type-checking JSON translation documents.

This CLI allows to quickly create such a schema based on the intl-schematic plugins you have currently installed.

Using the CLI

Broken right now, see manual definition.

To quickly define the translation.schema.json for your translation documents, you can run the official CLI in your project's root:

npx intl-schematic init
# or provide an optional custom file name
npx intl-schematic init ./locales/my-translation.schema.json

And then use it in your translation document:

// en.json
{
  // Path to the schema from the example above
  "$schema": "./translation.schema.json",
  "key": "Translation of my key"
}
import translation from './en.json';

const t = createTranslator(() => translation);

// Etc., see example at the start of this file

Note: the $schema key will be automatically excluded
from type hints for t() for your convenience!

Keywords

FAQs

Last updated on 11 Jan 2024

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