Skip to content

development

Kevin Mathmann edited this page Mar 27, 2018 · 4 revisions

Development

Installation

  1. Clone this repository
  2. Run npm i

If you have no access to the internal tobit.software npm server you need to remove/replace the usage of the package chayns-logger.

DevServer

  1. Run npm start to fire up the dev server
  2. Open https://localhost:7070

To use a SSL certificate you can create a ssl.crt and a ssl.key file under webpack/ssl

Run npm run start:http to fire up the dev server on http:// instead of https://

Building

Use npm run build to build the project in production.

Use npm run build:staging to build the project with source-maps in staging.

Debug functions

Debug functions could be found under window.cnrt.

window.cnrt = {
    ConsoleLogger: {
        LEVELS, // ENUM
        setLevel // Function takes LEVELS ENUM
    },
    ENV, // ENUM
    changeEnv, // Function takes ENV ENUM
    TAPPIDS, // ENUM with selected TappIds
    loadTapp // Function takes a TappId 
};

/**
 * Example: load intercom tapp over console
 */
window.cnrt.loadTapp(window.cwl.TAPPIDS.INTERCOM)