overleaf/services/web/scripts/plan-prices
Thomas 8efac32c8a Add LATAM currencies/prices to plan and group settings/scripts (#13661)
* Add LATAM currencies to plan-prices generator script

* Add LATAM prices to web configs

* Add LATAM currencies to group plan price formatting

* Use toLocaleString to format currencies for LATAM regions

GitOrigin-RevId: ce672043bef16298c87efa007eac23b004be8205
2023-07-17 11:01:00 +00:00
..
.gitignore
package-lock.json
package.json
plans.js Add LATAM currencies/prices to plan and group settings/scripts (#13661) 2023-07-17 11:01:00 +00:00
README.md

A nodejs tool for reading plans prices from an Excel file and creating JSON objects.

Run npm install in order to install the xlsx dependency.

The scripts will put the output results into the output folder.

Create localized and group plan pricing

Command node plans.js -f fileName -s sheetName -o outputdir - generates three json files:

  • localizedPlanPricing.json for /services/web/config/settings.overrides.saas.js
  • plans.json for /services/web/frontend/js/main/plans.js
  • groups.json for /services/web/app/templates/plans/groups.json

The input file can be in .xls, .csv or .json format

  • .xlsx excel spreadsheet, requires the -s sheetName option
  • .csv csv format, same data as for excel spreadsheet
  • .json json format from the recurly_prices.js --download script output