# script-language

> This is CLI command. It will generate text which around by any function to object.

Latest version **1.0.2** (published 2022-03-16) · 0 weekly downloads

## Install

```sh
npm install script-language
pnpm add script-language
yarn add script-language
bun add script-language
```

Provides the command `script-language`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-03-16 |
| First published | 2022-03-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | khacy |
| Maintainers | khacy |
| Keywords | cli, language, generate json, json language, multiple language |

## Links

- npm: https://www.npmjs.com/package/script-language
- Repository: https://github.com/khacywin/script-language
- Homepage: https://github.com/khacywin/script-language#readme
- Issues: https://github.com/khacywin/script-language/issues
- npm.io page: https://npm.io/package/script-language

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2022-03-16
- 1.0.0 — 2022-03-14

## README

# script-language

This is CLI command.<br/>
The `script-language` will generate text which around by any function to object.

## Install

With npm

```
  npm install -g script-language
```

With yarn

```
  yarn global add script-language
```

## Usage

Run script in your code folder

```
  script-language
```

## CLI command

| Flag         | Type   | Description                              |
| ------------ | ------ | ---------------------------------------- |
| **--outDir** | string | Path of folder consist will be generated |

## File language.config.json

| Properties       | Type               | Description                                     | Default                   |
| ---------------- | ------------------ | ----------------------------------------------- | ------------------------- |
| **excludes**     | array              | Folder will be ignored                          | ["node_modules"]          |
| **includes**     | array              | Folder will be run                              | ["src"]                   |
| **match**        | string             | File match                                      | \^.\*.(js\|ts\|jsx\|tsx)$ |
| **nameFunction** | string \| string[] | Name of function contain text will be generated | "\_t"                     |
| **outDir**       | string             | Path of folder consist will be generated        | "./language"              |
| **language**     | array              | List language                                   | ["vi-VI", "en-EN"]        |

## Example

```
  ...
  <div>{ _t("Sessions is expired.") }</div>

  ...
  <a>{_t("Sign in")}</a>


  ...
  console.log(_t("You can reset password"))

  ...
  <button>{_t("Sent")}</button>
```

<br />

`language/vi.json`

```
  {
    "Sessions is expired.": "Sessions is expired.",
    "Sign in":"Sign in",
    "You can reset password": "You can reset password",
    "Send": "Send",
  }
```

`language/en.json`

```
  {
    "Sessions is expired.": "Sessions is expired.",
    "Sign in":"Sign in",
    "You can reset password": "You can reset password",
    "Send": "Send",
  }
```

---
_Source: https://npm.io/package/script-language · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
