zaach / jsxgettext

Extract gettext calls from JavaScript, EJS, and other template formats.
Mozilla Public License 2.0
105 stars 56 forks source link

Support the spread operator #111

Open jknight12882 opened 8 years ago

jknight12882 commented 8 years ago

This is particularly important for Redux projects which widely promotes the pattern.

Looks like there is a new acorn plugin which adds support https://github.com/UXtemple/acorn-object-spread

jknight12882 commented 7 years ago

Any movement on this?

tvilon commented 7 years ago

I opened a PR to fix this

tvilon commented 7 years ago

But I think it's probably better to use babel first to compile and then jsxtext on top. In my case with a create-react-app boilerplate and yarn

yarn run jsxgettext -k '__' -o  ../locales/elevo_front.pot <(NODE_ENV='production' yarn run -s babel src/ --presets=react-app)