# Tools and libraries
This chapter is about tools, libraries and technologies that are used in AsTeRICS Grid project:
# Tools
This section is about tools that are used for development, dependency management and releasing.
# Node package manager (npm)
The node package manager (npm) is used for managing Javascript dependencies and running various tasks related to the project. The npm configuration file is package.json.
# npm dependencies
The configuration file package.json includes the key dependencies which include dependencies that are used in order to run AsTeRICS Grid:
- @sensu/superlogin: framework providing user management in connection to CouchDB, the database backend used by AsTeRICS Grid
- cors: CORS handler for HTTP requests, used by superlogin
- morgan: logger for HTTP requests, used by superlogin
- superlogin-client: Javascript client for a superlogin instance running on a server
The other listed dependencies are Javascript libraries.
# npm dev-dependencies
The configuration file package.json includes the key dev-dependencies which include dependencies that are used for development of AsTeRICS Grid. These are the most important ones:
- webpack: framework using for bundling javascript, vue and css resources
- webpack-dev-server: local http server for development of the application
- babel-core: framework for transpiling Javascript sources with newer language features to Javascript that is compatible with older browsers.
- jest: Unit testing framework for javascript
# Webpack
Webpack is used in order to bundling the Javascript sources to a single and minified bundle file. The configuration file for webpack is webpack.config.js. It may seem complicated at first sight, but basically it’s configuring 3 things:
- Bundling of all sources from the
src/folder to one minified file inapp/build/andapp/build_lecagy. This bundling is configured by the two objectsconfigNormalandconfigLegacythat are returned at the end of the script. - Generating the appcache.manifest file for offline support. This is done by using the appcache-webpack-plugin and listing all needed resources in it’s configuration.
- Configuring the development webserver: this is done by the property object returned in the function
getDevServer()
# Javascript libraries
This section is about Javascript libraries that are used within the AsTeRICS Grid project. They can be found in two locations:
- As dependency listed within
dependenciesin the package.json configuration file - As external library included in the app/lib/ folder
These are the Javascript libraries that are used:
- file-saver: library for downloading files within a web-application
- lz-string: library for string compression, used for imported default dictionaries*
- navigo: javascript routing library based on URL hash
- predictionary: javascript word prediction library
- vue: javascript single-page application framework
- dom-i18n: easy to use DOM-internationalization library
- jQuery: library for document traversal and manipulation, needed for jQueryUI
- jQueryUI: library for user interface interactions, needed for jQuery contextMenu and GridList
- jQuery contextMenu: jQuery plugin for right-click context menus, used in AsTeRICS Grid e.g. for edit menu of a grid element
- GridList: jQueryUI based library for creation of a dynamic, draggable grid
- loglevel: javascript logging library
- ObjectModel: library for dynamic type checking, see data models in src/js/model/
- PouchDB: library for accessing IndexedDB and synchronization with a remote CouchDB
- sjcl: crypto library published by Stanford University that is used for encryption of user configuration
← 01 Structure 03 Grid →