faker
faker copied to clipboard
<?>: split download size in half
EXPERIMENTAL
What is this?:
- All TS files in
src/locales
were converted into.json
files - These are then bundled together as
src/locales/<locale>.json
file to require/import them (for at-dev time) - They are copied into
dist/locales/<locale>.json
and are required/imported by cjs and esm from same source (for at-bundled time)
Open TODOs:
- fix tests
- manage generated docs
- fix bugs (specially locale
ar
andur
)
Later?
- write a locale validator
- write a locale analyser to get how many % is missing for a locale
To review this PR, I tried as best as I could to separate all commits
Just out of the interest: what's the benefit of having locales as json vs ts?
Just out of the interest: what's the benefit of having locales as json vs ts?
Most important one: splitting the package size into HALF!
Second important one: having simpler files to manage like reducing all the boiler plate around the real content and making it somewhat simpler for a contributor to contribute