# @americanexpress/one-app-locale-bundler

> A command line interface(CLI) tool for bundling the locale files.

Latest version **6.6.0** (published 2023-09-14) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @americanexpress/one-app-locale-bundler
pnpm add @americanexpress/one-app-locale-bundler
yarn add @americanexpress/one-app-locale-bundler
bun add @americanexpress/one-app-locale-bundler
```

Provides the command `bundle-module-locale`.

## 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 | 6.6.0 |
| Published | 2023-09-14 |
| First published | 2019-12-19 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 6 |
| Unpacked size | 41.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 36 |
| Maintainers | pixnbits, anescobar1991, jsmartfo, amexopensource |
| Keywords | one, amex, bundler, locale, environment |

## Links

- npm: https://www.npmjs.com/package/@americanexpress/one-app-locale-bundler
- Repository: https://github.com/americanexpress/one-app-cli
- Issues: https://github.com/americanexpress/one-app-cli/issues
- npm.io page: https://npm.io/package/@americanexpress/one-app-locale-bundler

## Dependencies (6)

- [glob](https://npm.io/package/glob.md) ^7.1.2
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [mock-fs](https://npm.io/package/mock-fs.md) ^5.1.1
- [chokidar](https://npm.io/package/chokidar.md) ^3.0.0
- [json-parse-context](https://npm.io/package/json-parse-context.md) ^1.0.1

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 6.6.0 (latest) — 2023-09-14
- 6.13.0-beta.1 (beta) — 2021-05-19
- 6.5.11 — 2023-06-13
- 6.5.10 — 2023-05-15
- 6.5.9 — 2023-05-03
- 6.5.8 — 2023-04-07
- 6.5.7 — 2023-03-09
- 6.5.6 — 2023-02-16
- 6.5.5 — 2022-11-16
- 6.5.4 — 2022-11-15
- 6.5.3 — 2022-08-12
- 6.5.2 — 2022-01-18
- 6.5.1 — 2021-11-17
- 6.5.0 — 2021-02-23
- 6.4.0 — 2020-11-05
- … 4 more at https://npm.io/package/@americanexpress/one-app-locale-bundler/versions

## README

# @americanexpress/one-app-locale-bundler

[![npm](https://img.shields.io/npm/v/@americanexpress/one-app-locale-bundler)](https://www.npmjs.com/package/@americanexpress/one-app-locale-bundler)

> A command line interface (CLI) tool for bundling a module's locale files for use within the
[One App ecosystem](https://github.com/americanexpress/one-app). This is used internally by
`one-app-bundler` and its `bundle-module` script.

## 📖 Table of Contents

* [Usage](#-usage)

## 🤹‍ Usage

Add files and format them using either options shown below within your one app module.

```
- locale
  - en-US
    - links
      - integration.json
      - qa.json
      - production.json
     copy.json
```

or

```
- locale
  - en-US.json
  - es-ES.json
```

### Installation

```bash
npm i -D @americanexpress/one-app-locale-bundler
```

There are two ways to use this:

### 1. Usage with a build script

Use `bundle-module-locale` in your build script and `one-app-locale-bundler` as a development dependency.

```json
{
  "scripts": {
    "build": "bundle-module-locale"
  },
  "devDependencies": {
    "@americanexpress/one-app-locale-bundler": "^2.3.0"
  }
}
```

### 2. Invocation using a function

The other option is to require `@americanexpress/one-app-locale-bundler` and invoke the function for bundling.

Within the package.json file.

```json
{
  "devDependencies": {
    "@americanexpress/one-app-locale-bundler": "^2.3.0"
  }
}
```

In your JS module.

```js
const localeBundler = require('@americanexpress/one-app-locale-bundler');

localeBundler();
```

Once the npm script `npm run build` is run or the function is invoked the locales are bundled and added to the build folders below. The json files contain
content for `development`, `qa` and `production` environments.

```
- build
  - 1.0.0
    - en-us
      - module-name.json
      - integration.json
      - qa.json
```

---
_Source: https://npm.io/package/@americanexpress/one-app-locale-bundler · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
