mirror of https://github.com/MaxLeiter/Drift
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.5 KiB
1.5 KiB
Basic Globalize Compiler example
This example focuses on the Globalize Compiler and the Globalize runtime modules. It assumes knowledge of Globalize usage basics.
Requirements
1. Install Globalize dependencies and Globalize Compiler
This example uses npm
to download Globalize dependencies (i.e., CLDR data and
the Cldrjs library) and the Globalize Compiler.
npm install
Running the example
Development mode
- Start a server by running
python -m SimpleHTTPServer
or other alternative servers such as http-server, nginx, apache. - Point your browser at
http://localhost:8000/development.html
. Note that the formatters are created dynamically. Therefore, Cldrjs and CLDR data are required. - Understand the demo by reading the source code. We have comments there for you.
Production mode
- Compile the application formatters by running
npm run build
. Seepackage.json
to understand the actual shell command that is used. For more information about the compiler, see the Globalize Compiler documentation. - Point your browser at
./production.html
. Note that we don't need Cldrjs nor CLDR data in production here. - Understand the demo by reading the source code. We have comments there for you.