0.2.0 • Published 4 years ago

nymus v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Transform ICU messages into React components.

Usage

Example

npx nymus ./messages.json

given a ./messages.json file:

{
  "Welcome": "It's {name}, {gender, select, male {his} female {her} other {their}} birthday is {birthday, date, long}"
}

nymus will generate a module containing React components that can be readily imported in your project as follows:

import * as React from 'react';
import { Welcome } from './messages';

export function HomePage() {
  return <Welcome name="John" gender="male" birthday={new Date(1985, 11, 3)} />;
}

Documentation

Author

👤 Jan Potoms