laget-se / narp

A workflow utility to ease localization in JS(X) apps
Apache License 2.0
13 stars 1 forks source link

Adds a `--fresh` argument to the push command #7

Closed alexanderwallin closed 6 years ago

alexanderwallin commented 6 years ago

Sometimes you might want to do a fresh push, for instance when your 1000 strings limit on Poeditor has been reached. 😬

Adding --fresh (or passing fresh: true) to the push skips the merge with the current upstream pot and pushes the extract pot contents as is.

I made use of async/await, since the conditional merge resulted in a rather ugly .then() sauce.

ridderholt commented 6 years ago

Looks nice, could you update Readme with info about this new option? I'm currently on parental leave so I might not have time to do a merge and publish to NPM but maybe Larsson or Storm has the time.

alexanderwallin commented 6 years ago

Ah, good on you!

@MickeLarsson Wanna have a look?

alexanderwallin commented 6 years ago

It does remind of that in practice, but I think it conveys its function inaccurately. For instance, – in theory – you might --force a merged pot in the case of issues/warnings/conflicts at the vendor's side.

alexanderwallin commented 6 years ago

@MickeLarsson Thanks! Could you publish a new release, please?

MickeLarsson commented 6 years ago

No Prob! Another one? I published 3.2.0 containing the changes yesterday - https://www.npmjs.com/package/narp

alexanderwallin commented 6 years ago

Ah! Would you just push the version commit then? <3

MickeLarsson commented 6 years ago

Oh... forgot that. Pusheded it now.