<commit_before>You will need:
- bash
- node (mini latest LTS)
- npm (latest too, it's better)



>**⚠ If you use Windows plz follow this document before anything else [how to prepare Windows](https://github.com/ProtonMail/proton-shared/wiki/setup-windows)**



## How to dev 1

1. Clone this repository
2. Run `$ npm i`
3. `$ npm start`

It will give you the URL where it's available.

> You can login via `/login`

## Sync translations [App  to crowdin]

You can sync them via `$ npm run i18n:upgrade`, it will:
- Extract translations
- Push them to crowndin
- Create a commit with them on the repo


## How to deploy

- `$ npm run deploy -- --branch=<deploy-X> --api=<target>`
_Deploy the app as /$config_

`$config`: See package.json config.publicPathFlag

- `$ npm run deploy:standalone -- --branch=<deploy-X> --api=<target>`
_Deploy the app as deploy + /login_

Based on [proton-bundler](https://github.com/ProtonMail/proton-bundler)

## Sync translations [Crowdin to our App]

To get latest translations available on crowdin, you can run `$ npm run i18n:getlatest`.
It will:
- Get list of translations available (default same as proton-i18n crowdin --list --type --limit=95)
- Upgrade our translations with ones from crowdin
- Store a cache of translations available in the app
- Export translations as JSON
- Commit everything

> :warning: If you want to get only a **custom** list of translations, configure it inside `po/i18n.txt` and run `$ npm run i18n:getlatest -- --custom`<commit_msg>[CI] Add proton-version dependency + update readme<commit_after>You will need:
- bash
- node (mini latest LTS)
- npm (latest too, it's better)



>**⚠ If you use Windows plz follow this document before anything else [how to prepare Windows](https://github.com/ProtonMail/proton-shared/wiki/setup-windows)**



## How to dev 1

1. Clone this repository
2. Run `$ npm i`
3. `$ npm start`

It will give you the URL where it's available.

> You can login via `/login`

## Sync translations [App  to crowdin]

You can sync them via `$ npm run i18n:upgrade`, it will:
- Extract translations
- Push them to crowndin
- Create a commit with them on the repo


## How to deploy

- `$ npm run deploy -- --branch=<deploy-X> --api=<target>`
_Deploy the app as /$config_

`$config`: See package.json config.publicPathFlag

- `$ npm run deploy:standalone -- --branch=<deploy-X> --api=<target>`
_Deploy the app as deploy + /login_

Based on [proton-bundler](https://github.com/ProtonMail/proton-bundler)

## Sync translations [Crowdin to our App]

To get latest translations available on crowdin, you can run `$ npm run i18n:getlatest`.
It will:
- Get list of translations available (default same as proton-i18n crowdin --list --type --limit=95)
- Upgrade our translations with ones from crowdin
- Store a cache of translations available in the app
- Export translations as JSON
- Commit everything

> :warning: If you want to get only a **custom** list of translations, configure it inside `po/i18n.txt` and run `$ npm run i18n:getlatest -- --custom`

## :rocket: Create a new version (before deploy)

This command will:

- Manage dependencies (detect and update the lock)
- Take care of active npm links
- run npm version

```sh
$ npx proton-version <patch|minor|major>
```
> Default is patch

If you want to force the update of all dependencies add the flag `--all`;

By default it provides a prompt and ask you what you want to update etc.

> If you have an active `npm link` it will remove it from your node_modules.
{'fraction_non_alphanumeric': 0.10705109905795032, 'fraction_numerical': 0.009135027119611762, 'mean_word_length': 3.79343365253078, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 20, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '214598', 'n_tokens_mistral': 1160, 'n_tokens_neox': 1066, 'n_words': 472}