ePages Diagnostics
Explore your Site - Analyze the System
Find:
Packages

JavaScript API Documentation

If you cannot see any items in the tree on the left side you have to run the documentation generation script. Notice that the documentation is based on the javascript modules of a specific StoreType - obviously the StoreType of the Store you are running your diagnostics on right now. You need the command line PHP interpreter (php-cli) with version at least v5.2.0 to run the script:

  1. Install php-cli version 5.2.0 or higher and dependencies (example with CentOS5 here):
    # Enable CentOS testing repo.
    cd /etc/yum.repos.d
    wget http://dev.centos.org/centos/5/CentOS-Testing.repo
    vi CentOS-Testing.repo
    
    # Change the corresponding line to look like this:
    enabled=1
    
    # Make sure only required packages will be used from testing repo.
    # Add the following line:
    includepkgs=php-cli gmp php-common
    
    
    # Install php-cli.
    yum install php-cli
                
  2. Run the generate script:
    cd $EPAGES_WEBROOT/StoreTypes/##STORETYPE##/##VERSION##/javascript/util/docscripts_epages
    php -d short_open_tag=On generate.php
  3. Don't forget to set the file/directory access rights correctly for the created ./documentation directory, i.e.:
    /etc/init.d/epages6 perm webroot
                

To use the documentation, select a class on the left side to view its API. Click on one of the entries to view the module's methods and properties.

In parallel to the documentation the script also generates a JavaScript style check report. You can change the rules for its errors and warnings in the config.ini file.