Skip to content

razbakov/sourcy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

@razbakov/sourcy

Synchronise data from Google Sheets

Installation

yarn add @razbakov/sourcy -D

Add to package.json:

{
  "scripts": {
    "sourcy": "sourcy"
  }
}

Create sourcy.config.js in project root:

module.exports = {
  sources: [
    {
      spreadsheetId: "spreadsheet id",
      range: "sheet name",
      output: "./locales/",
      transformer: "i18n",
      format: "yaml", // or json
    },
  ],
};

Execute and follow instructions:

yarn sourcy

Transformer: i18n

Input:

key en de es ru
home.title Home Startseite Página inicial Главная

Output:

en.yml
    home.title: Home

de.yml
    home.title: Startseite

es.yml
    home.title: Página inicial

ru.yml
    home.title: Главная

About

Synchronise data from Google Sheets

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published