MihaiValentin / lunr-languages

A collection of languages stemmers and stopwords for Lunr Javascript library
Other
431 stars 163 forks source link

Use Dutch language code nl #50

Closed cocoatomo closed 5 years ago

cocoatomo commented 5 years ago

This PR resolves issue #43 .

MihaiValentin commented 5 years ago

Thanks for this contribution and also for considering preventing breaking changes!

The lunr.<locale> and min/lunr.<locale> files are generated at build time, running npm run build. Modifying them directly will just override them on next build.

I think the best way for now is to duplicate (create a new entry in build.js with nl, but identical to the one with du, and run the build script. You could also change the build script, so it could inject a message in the du file, like console.warning(message), in which case the message for du would be "The du language code was corrected to nl. Please use the nl, as in the next versions the du file will be removed".

Then, whenever I'll build a new breaking change version of the npm package, I'll delete the du file.

What do you think?

MihaiValentin commented 5 years ago

Added NL and deprecated DU (added a console.warn message). I'll close this PR.

cocoatomo commented 5 years ago

Oh, thank you for your proposal and works 👍