# webpack-phraseapp-builder

> A webpack plugin to download translations from phraseapp and place them in your project

Latest version **2.0.0** (published 2017-06-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-phraseapp-builder
pnpm add webpack-phraseapp-builder
yarn add webpack-phraseapp-builder
bun add webpack-phraseapp-builder
```

## 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 | 2.0.0 |
| Published | 2017-06-14 |
| First published | 2017-05-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | cornerjob |
| Maintainers | cornerjob |
| Keywords | webpack, phraseapp |

## Links

- npm: https://www.npmjs.com/package/webpack-phraseapp-builder
- Repository: https://github.com/cornerjob/webpack-phraseapp-builder
- Homepage: https://github.com/cornerjob/webpack-phraseapp-builder#readme
- Issues: https://github.com/cornerjob/webpack-phraseapp-builder/issues
- npm.io page: https://npm.io/package/webpack-phraseapp-builder

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2017-06-14
- 1.3.0 — 2017-06-13
- 1.2.2 — 2017-05-29
- 1.2.1 — 2017-05-29
- 1.2.0 — 2017-05-29
- 1.1.0 — 2017-05-26
- 1.0.1 — 2017-05-24

## README

# Webpack PhraseAppBuilder Plugin

Webpack plugin for generating translations files from PhraseApp.
This plugin uses the download API endpoint from PhraseApp, for further information please see the following [link](https://phraseapp.com/docs/api/v2/locales/#download)
This plugin will run before the Webpack compilation, so the translations are available before the Webpack assertions.

*Since this plugin will download the translations before the assertions, is not recommended to use the same path as the [output path for Webpack](https://github.com/webpack/docs/wiki/configuration#configuration-object-content) assertions*

## Install

To install the package run the following command:
```shell
  npm install -D webpack-phraseapp-builder
```

## Usage

In your `webpack.config.js`

```javascript
var PhraseAppBuilderPlugin = require('webpack-phraseapp-builder');

module.exports = {
    // ...
    plugins: [
      new PhraseAppBuilderPlugin({
        accessToken: 'theAccesTokenId',  // Get your accessToken from PhraseApp
        projectId: 'theProjectId', // Get the project id from PhraseApp
        outputPath: 'path',
        format: 'json' // specify the format from Phraseapp
      })
    ]
};
```

This will generate translations files in your configured output directory, for example:

```json
// src/translations/es.json

{
  "some.key": "hello",
}
```

**Options:**

* `localesId`: The locales id from your PhraseApp project.
* `accessToken`: The accessToken to authorize the PhraseApp API.
* `outputPath`: The path where you want to download the translations.
* `projectId`: The project id from PhraseApp from where you want to extract your translations
* `format`: The format to download the translations

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