# generator-crowdin-app

> Crowdin Apps generator

Latest version **0.2.1** (published 2022-07-15) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install generator-crowdin-app
pnpm add generator-crowdin-app
yarn add generator-crowdin-app
bun add generator-crowdin-app
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2022-07-15 |
| First published | 2021-10-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 170.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Crowdin |
| Maintainers | andrii.bodnar |
| Keywords | yeoman-generator, crowdin, app, apps |

## Links

- npm: https://www.npmjs.com/package/generator-crowdin-app
- Repository: https://github.com/crowdin/apps-generator
- Issues: https://github.com/crowdin/apps-generator/issues
- npm.io page: https://npm.io/package/generator-crowdin-app

## Dependencies (4)

- [chalk](https://npm.io/package/chalk.md) ^2.1.0
- [yosay](https://npm.io/package/yosay.md) ^2.0.2
- [request-light](https://npm.io/package/request-light.md) ^0.5.4
- [yeoman-generator](https://npm.io/package/yeoman-generator.md) ^3.1.1

## Recent versions

- 0.2.1 (latest) — 2022-07-15
- 0.2.0 — 2022-06-02
- 0.1.0 — 2022-05-17
- 0.0.2 — 2021-10-28
- 0.0.1 — 2021-10-27

## README

[<p align="center"><img src="https://support.crowdin.com/assets/logos/crowdin-dark-symbol.png" data-canonical-src="https://support.crowdin.com/assets/logos/crowdin-dark-symbol.png" width="200" height="200" align="center"/></p>](https://crowdin.com)

# Crowdin Apps Generator

Crowdin Apps Generator will help you to get started with building your Crowdin App. It contains common templates and will walk you through the steps required to create your App prompting for the required information.

[About Crowdin Apps](https://support.crowdin.com/crowdin-apps)

## Status

[![Node.js CI](https://github.com/crowdin/apps-generator/actions/workflows/node.js.yml/badge.svg)](https://github.com/crowdin/apps-generator/actions/workflows/node.js.yml)
[![npm](https://img.shields.io/npm/v/generator-crowdin-app?logo=npm&cacheSeconds=1800)](https://www.npmjs.com/package/generator-crowdin-app)
[![npm](https://img.shields.io/npm/dt/generator-crowdin-app?cacheSeconds=1800)](https://www.npmjs.com/package/generator-crowdin-app)

## Installation

Install [Yeoman](http://yeoman.io) and `generator-crowdin-app` using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).

```bash
npm install -g yo
```

```bash
npm install -g generator-crowdin-app
```

## Generating an App

### Creating an OAuth App

First, you need to create an OAuth App to be able to make authorized requests from your app to Crowdin. After creating an OAuth App you will receive Client ID and Client Secret values which will be used later for deployment.

For more about Creating an OAuth App see the documentation:
- [Crowdin](https://support.crowdin.com/creating-oauth-app/)
- [Crowdin Enterprise](https://support.crowdin.com/enterprise/creating-oauth-app/)

Once you have *Client ID* and *Client Secret* you also need to have a URL where your app will be publicly accessible from the internet.

For development purposes you can use [ngrok](https://ngrok.com/):

```bash
ngrok http 3000
```

Henceforth, the ngrok forwarding URL should be used as *App Base URL*.

### Running the generator

The Yeoman generator will walk you through the steps required to create your app prompting for the required information.

To launch the generator simply type:

```bash
yo crowdin-app
```

![The command generator](yo-crowdin-app.png)

## Generator Output

These templates will:
* Create a base folder structure
* Template out a rough `package.json` and app configuration
* Import any assets required for your app

## Crowdin App Installation

Start your app:

```bash
cd <your_app_directory>
```

```bash
node index.js
```

To connect the app with your project in **Crowdin Enterprise**, please follow these steps:

- Open _Organization Settings_ > _Apps_ tab and click _Manual install_ button.
- Paste the URL to your app manifest (e.g. `https://123-456.ngrok.io/manifest.json`) and click _Install_.
- Select the users that will be able to use the app and the projects where users will be able to use the app.
- Open any project where this app is supposed to be, _Applications_ > _Custom_.

To connect the app with your project in **Crowdin**, please follow these steps:

- Open _Account Settings_ > _Crowdin Applications_ tab and click _Manual install_ button.
- Paste the URL to your app manifest (e.g. `https://123-456.ngrok.io/manifest.json`) and click _Install_.
- Select the users that will be able to use the app and the projects where users will be able to use the app.
- Open any project where this app is supposed to be, _Applications_ > _Custom_.

Now you can play with your Crowdin App and add more features to it :tada:

## Command line

```
Usage:
  yo crowdin-app [<destination>] [options]

Argument (optional):
  The destination to create the app in, absolute or relative to the current working
  directory. Use '.' for the current folder.
  If not provided, defaults to a folder in the current working directory with the app
  display name.

Options:
  -h,   --help                  # Print the generator's options and usage
  -q,   --quick                 # Quick mode, skip all optional prompts and use defaults
  -t,   --appType               # integration, mt, file, editor, project-menu, project-reports, resources, project-tools, organization-menu
  -n,   --appDisplayName        # App display name
  -i,   --appIdentifier         # Identifier of the app
        --appDescription        # Description of the app
        --pkgManager            # 'npm' or 'yarn'
        --gitInit               # Initialize a git repo
        --appBaseUrl            # App Base URL
        --clientId              # OAuth app Client ID
        --clientSecret          # OAuth app Client Secret
        --port                  # App network port
        --fileType              # Custom file format type (only for the 'file' app type)
        --multilingual          # Define if your file type multilingual (only for the 'file' app type)

Example usages:
  yo crowdin-app                          # Create an app in a folder with the app's name.
  yo crowdin-app Hello -t=integration -q  # Create an integration module app in './Hello', skip prompts, use defaults.
```

## Getting To Know Yeoman

* Yeoman has a heart of gold.
* Yeoman is a person with feelings and opinions, but is very easy to work with.
* Yeoman can be too opinionated at times but is easily convinced not to be.
* Feel free to [learn more about Yeoman](http://yeoman.io/).

## Contributing
If you want to contribute please read the [Contributing](/CONTRIBUTING.md) guidelines.

## Seeking Assistance

If you find any problems or would like to suggest a feature, please feel free to file an issue on GitHub at [Issues Page](https://github.com/crowdin/apps-generator/issues).

If you've found an error in these samples, please [Contact Customer Success Service](https://crowdin.com/contacts).

## License

```
The Crowdin Apps Generator is licensed under the MIT License.
See the LICENSE file distributed with this work for additional
information regarding copyright ownership.

Except as contained in the LICENSE file, the name(s) of the above copyright
holders shall not be used in advertising or otherwise to promote the sale,
use or other dealings in this Software without prior written authorization.
```

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