1.0.9 • Published 4 years ago

@motork/poeditor-sync v1.0.9

Weekly downloads
90
License
GPL-3.0
Repository
bitbucket
Last release
4 years ago

POEditor Sync

Synchronize translations with POEditor

Usage

Download JSON files

const POEditorSync = require('@motork/poeditor-sync').default;

// or with ES6
import POEditorSync from '@motork/poeditor-sync',

// Donwload files and write them in `output`
POEditorSync
    .download({
        api_token: '123qwe456rty789yui098poi123qwe12', // POEditor API KEY
        id: '33333', // project ID
        type: 'key_value_json', // Type of the file to download - default: key_value_json
        languages: ['de', 'en', 'es', 'fr', 'it'], // List of languages to download - default: 'de', 'en', 'es', 'fr', 'it'
        output: `${__dirname}/lang`,
        log: true, // default: true
    })
    .then((values) => { // You can optionally, do something after files have been downloaded
        values.forEach(({ status, value }) => {
            // status -> Promise status: fulfilled, rejected
            // value  -> Downloaded file info: value.url, value.output, value.language, value.type
        });
    });

Development

npm i

Test

npm test

Build

npm run build
1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago