-
Notifications
You must be signed in to change notification settings - Fork 590
Closed
Labels
Description
PR #481
Provide better documentation by creating a full stack example using webpack and Globalize.
Goal
Development
- Easy development, Globalize is a powerful and flexible library, but it can be frustrating to set it up (e.g., loading required CLDR data on development, using compiled data instead on production). It should be easy for developers to build apps using Globalize. Ideally, they should be able to use Globalize (declaratively) without worrying about any of these setups.
- Fast Live Reload, Webpack allows writing code in source code formats that browsers don't natively interpret (e.g., coffee script, ES6, less or sass styles, etc) and have them to display it in real time by pre-processing the code into a compatible JavaScript and by having browsers to auto refresh on a process called live reload (HMR Hot Module Replacement), which is a very powerful tool. But, it's frustrating when the pre-processing takes too much time and doesn't get responsive. Ideally, Globalize on development shouldn't weight the process, it should allow for very fast updates from its part.
Production
- Optimized for Production, use precompiled formatters/parsers: Runtime code (smaller and quicker) for production #398
- Small. Avoid including unnecessary i18n data. For example, doesn't include unnecessary translation messages, doesn't include unnecessary functionality data (e.g., doesn't include calendar information if not formatting dates, doesn't include currency data if not formatting currencies, etc), doesn't include unnecessary data within the same functionality (e.g., doesn't include month names if formatting dates using numbered months only). Thefore, no bandwidth is wasted.
- Fast. Have all formatters (numbers, currencies, datetimes, relative time) generated/preprocessed at built time. This is, traversing CLDR data and generating the formatters will happen during build time and will be precompiled for runtime. Therefore, no CPU clocks are wasted on the client.
- Compiled-Globalize-Code in separate chunks, allow grouping compiled-globalize code in separate chunks.
Reactions are currently unavailable