Modules: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
Line 25: Line 25:


== Javascript libraries ==
== Javascript libraries ==
The usage of javascript libraries like jQuery, Highcharts or Leaflet is controlled by the user who already may have these libraries included in his website on another level. In that case a second inclusion is not wanted. Therefore two explicit parameters exist which govern these situations: ''GeneratejQueryInclude'' and ''DoLibraryIncludes''.
Each module has its own parameters but for modules which use javascript, Highcharts or Leaflet libraries there are additional considerations. It is assumed that modules are used within a website so there is no document load function to start the javascript or other initialisation.


As [https://jquery.com/ jQuery] is a requirement for almost all modules (with menu's), CumulusUtils has provided a parameter ''GeneratejQueryInclude'' in the section [General] which the user can set to true or false. If his site has already a general inclusion of this library or another version, set it to false. If the site has no other use for jQuery, set it to true. If you have no idea what I am talking about, set it to true or start reading about jQuery.
As [https://jquery.com/ jQuery] is a requirement for almost all modules (with menu's), CumulusUtils has provided a parameter ''GeneratejQueryInclude'' in the section [General] which the user can set to true or false. If his site has already a general inclusion of this library or another version, set it to false. If you have no idea what this is about, set it to true or start reading about javascript libraries.


Libraries for Highcharts or Leaflet are always included in that specific module but this may change in future this wiki will be adjusted accordingly.
Libraries for Highcharts or Leaflet are included when required in a specific module IF the inifile parameter ''DoLibraryIncludes'' is true (default). Set to false if you already use the libraries on another level. If you have no idea what this is about, set it to true or start reading about javascript libraries.


If you use the [[Website Generator]], '''set both parameters to false'''.


[[Category:CumulusUtils]]
[[Category:CumulusUtils]]

Revision as of 12:17, 16 April 2021

Introduction

Modules are the basic building blocks of CumulusUtils. Identifying modules on the commandline they become synonym with commands to CumulusUtils.

The list of modules

CumulusUtils offers the following modules (which can be used as commands):

  1. SysInfo
  2. Forecast
  3. StationMap
  4. UserReports
  5. pwsFWI
  6. Top10
  7. Graphs
  8. Yadr
  9. Records
  10. NOAA
  11. DayRecords
  12. AirQuality

The multiple module commands

In addition to the true modules which are equivalent to commands, there are commands which are strictly spoken not modules because they do not comprise a single functionality:

  1. Website => generates the website which consists of all modules, the inclusion of the libraries is embedded in website's index.html.
  2. All => generates all modules without the context of the website, the inclusion of the libraries is embedded in the generated files.
  3. UserAskedData => a specific command used for generating JSON datafiles when required by other modules (Compiler and/or AirQuality)
  4. CompileOnly => a command which activates the compiler only. This is a very specific command with more than one effect. Please check out its own page.

Javascript libraries

The usage of javascript libraries like jQuery, Highcharts or Leaflet is controlled by the user who already may have these libraries included in his website on another level. In that case a second inclusion is not wanted. Therefore two explicit parameters exist which govern these situations: GeneratejQueryInclude and DoLibraryIncludes.

As jQuery is a requirement for almost all modules (with menu's), CumulusUtils has provided a parameter GeneratejQueryInclude in the section [General] which the user can set to true or false. If his site has already a general inclusion of this library or another version, set it to false. If you have no idea what this is about, set it to true or start reading about javascript libraries.

Libraries for Highcharts or Leaflet are included when required in a specific module IF the inifile parameter DoLibraryIncludes is true (default). Set to false if you already use the libraries on another level. If you have no idea what this is about, set it to true or start reading about javascript libraries.

If you use the Website Generator, set both parameters to false.