Git Product home page Git Product logo

esn-frontend-calendar's Introduction

esn-frontend-calendar

Calendar application for OpenPaaS

Development

Configuration

First, you want to ensure that the application grid component is provided with the necessary information about the apps via the environment variable APP_GRID_ITEMS:

cp .env.example .env
  • APP_GRID_ITEMS: A stringified JSON representation of the apps to show in the application grid. It has the following shape:
    [
      { "name": "Inbox", "url": "http://localhost:9900/#/unifiedinbox/inbox" },
      { "name": "Calendar", "url": "http://localhost:9900/#/calendar" },
      ...
    ]

Then, launch the dev server on http://localhost:9900:

OPENPAAS_URL=https://dev.open-paas.org npm run serve
  • OPENPAAS_URL: The OpenPaaS URL to be used by the current SPA application. Defaults to http://localhost:8080.

The development server can also be used to serve minified SPA to check that everything is OK:

OPENPAAS_URL=https://dev.open-paas.org npm run serve:prod

Authentication

Authentication is provided by a dedicated SPA esn-frontend-login-app which is defined in the project devDependencies. In order to make it work with the webpack-dev-server launched by the npm run serve command, you will have to generate it like this:

cd ./node_modules/esn-frontend-login && npm install && npm run build

Serve

Go to http://localhost:9900/calendar/ to open the SPA

Build

Generates minified SPA in the ./dist folder:

npm run build:prod

Regarding APP_GRID_ITEMS, you can also provide it as a system variable for production purposes, e.g.:

APP_GRID_ITEMS="[{ \"name\": \"Calendar\", \"url\": \"https://dev.open-paas.org/calendar/\" }, { \"name\": \"Contacts\", \"url\": \"https://dev.open-paas.org/contacts/\" }, { \"name\": \"Inbox\", \"url\": \"http://dev.open-paas.org/inbox/\" }, { \"name\": \"Admin\", \"url\": \"https://dev.open-paas.org/admin/\" }, { \"name\": \"LinShare\", \"url\": \"https://user.linshare-4-0.integration-linshare.org/\" }]" npm run build:prod

Running tests

You can run tests by executing the following command:

npm run test

Note that there is a 10000ms timeout by default. If you want to change that, simply pass the TEST_TIMEOUT environment variable:

TEST_TIMEOUT=2000 npm run test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.