# ex-react-native-i18n-ts

> A tiny d.ts file generator for ex-react-native-i18n

Latest version **0.0.6** (published 2018-09-18) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install ex-react-native-i18n-ts
pnpm add ex-react-native-i18n-ts
yarn add ex-react-native-i18n-ts
bun add ex-react-native-i18n-ts
```

Provides the command `ex-react-native-i18n-ts`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2018-09-18 |
| First published | 2018-09-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 773.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | nissy |
| Keywords | react-native, typescript |

## Links

- npm: https://www.npmjs.com/package/ex-react-native-i18n-ts
- Repository: https://github.com/nd-02110114/ex-react-native-i18n-ts
- Homepage: https://github.com/nd-02110114/ex-react-native-i18n-ts#readme
- Issues: https://github.com/nd-02110114/ex-react-native-i18n-ts/issues
- npm.io page: https://npm.io/package/ex-react-native-i18n-ts

## Dependencies (3)

- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [commander](https://npm.io/package/commander.md) ^2.15.1
- [typescript](https://npm.io/package/typescript.md) ^2.7.2

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2018-09-18
- 0.0.5 — 2018-09-18
- 0.0.4 — 2018-09-18
- 0.0.3 — 2018-09-18
- 0.0.2 — 2018-09-18
- 0.0.1-security — 2018-09-17

## README

# ex-react-native-i18n-ts

This repository is forked from [react-native-i18n-ts](https://github.com/quipper/react-native-i18n-ts)

`ex-react-native-i18n-ts` is a `d.ts` file generator for [ex-react-native-i18n](https://github.com/xcarpentier/ex-react-native-i18n).

With generated `d.ts` file you can treat `I18n` object type-safely!

![demo](https://raw.githubusercontent.com/quipper/react-native-i18n-ts/master/doc/demo.gif)

## Installation

#### NPM

```sh
npm install -D ex-react-native-i18n-ts
```

#### Yarn

```sh
yarn add -D ex-react-native-i18n-ts
```

## Configuration

First of all specify the following settings in root `package.json`.

- `model`: file extension type can be either `.json`, `.ts` or `.js`
- `outputDir`: `d.ts` file will be emitted in specified directory

```json
"ex-react-native-i18n-ts": {
  "model": "./src/locale/languages/en.json",
  "outputDir": "./typings"
}
```

And add `outputDir` dir into `filesGlob` option in `tsconfig.json`.

```json
"filesGlob": [
  "typings/*.d.ts",
],
```

That's it! Now you can use `ex-react-native-i18n-ts` command which generates corresponding `d.ts` file.

We recommend to add scripts below into `package.json`.

```json
"scripts": {
  "i18n-ts": "ex-react-native-i18n-ts",
  "i18n-ts:watch": "ex-react-native-i18n-ts -w"
},
```

## Options

### Watch mode

You can enable watch mode by adding `--watch` (shorthand `-w`) flag.

In the watch mode, react-native-i18n-ts watches update of model file and generates d.ts file when the model is updated.

```sh
i18n-ts --watch
```

## Licence

```
Copyright 2018 Quipper Limited.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```

---
_Source: https://npm.io/package/ex-react-native-i18n-ts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
