@automattic/wp-babel-makepot

1.2.0 • Public • Published

wp-babel-makepot

A utility for extracting translatable strings from JavaScript source.

Using the CLI

wp-babel-makepot "<input_files>" -i "<ignore_patterns>" -b "<base_dir>" -d "<output_segments_dir>" -o "<output_file>" -p <babel_preset>

Example: wp-babel-makepot "./src/**/*.{js,jsx,ts,tsx}" -i "**/*.d.ts" -b "./src" -d "./build" -o "./build/bundle-strings.pot"

Docker:

docker run --init -it -v ~/path/to/source/files:/src -v ~/path/to/output:/build wp-babel-makepot

Develop

Locally (without docker)

yarn install
yarn run start "some/src/**/*.js{,x}" -- --ignore "**/node_modules/**,**/*.spec.js,**/*.test.js" --output "./strings.pot"

With Docker

docker build -t wp-babel-makepot .
docker run --init -it -v ~/path/to/source/files:/src -v ~/path/to/output:/build wp-babel-makepot

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.0131latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.0131
1.1.112
1.1.01
1.0.241
1.0.11
1.0.01

Package Sidebar

Install

npm i @automattic/wp-babel-makepot

Weekly Downloads

187

Version

1.2.0

License

GPL-2.0-or-later

Unpacked Size

51.3 kB

Total Files

26

Last publish

Collaborators

  • natalia.vidal
  • mehmoodak
  • mattwest-a8c
  • artpi
  • kthai15
  • dsmartg
  • pottedmeat
  • ianramosa8c
  • dilirity
  • arthur791004
  • mrmurphy
  • alshakero
  • pyronaur
  • imranh920
  • gmjuhasz
  • rcarvalho
  • briowill
  • bgrgicak
  • dhenridev
  • daledupreez-a8c
  • jeherve
  • yuliyan
  • micbosia8c
  • jeremy.yip
  • wpvip-bot
  • etobiesen
  • kzoschke
  • brunobasto
  • kat3samsin
  • fmfernandes
  • newspack
  • robertsreberski_a8c
  • msurdi-a8c
  • chihsuan
  • manzoorwanijk
  • rjchow
  • andrea-sdl
  • scjr
  • spsiddarthan
  • t2dw4t
  • ehg_
  • wwa
  • sirreal
  • elazzabi
  • royho
  • luismulinari
  • macbre
  • mjangda
  • matticbot
  • a8c
  • blowery
  • sgomes
  • tyxla
  • saroshaga
  • nejclovrencic
  • sirbrillig
  • chriszarate
  • robersongomes
  • johngodley