Skip to content

Latest commit

 

History

History
 
 

globalize-compiler

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

  1. Start a server by running python -m SimpleHTTPServer or other alternative servers such as http-server, nginx, apache.
  2. Point your browser at http://localhost:8000/development.html. Note that the formatters are created dynamically. Therefore, Cldrjs and CLDR data are required.
  3. Understand the demo by reading the source code. We have comments there for you.

Production mode

  1. Compile the application formatters by running npm run build. See package.json to understand the actual shell command that is used. For more information about the compiler, see the Globalize Compiler documentation.
  2. Point your browser at ./production.html. Note that we don't need Cldrjs nor CLDR data in production here.
  3. Understand the demo by reading the source code. We have comments there for you.