Skip to content

A webcomponent which displays all information about a skiarea in a quick view

License

Notifications You must be signed in to change notification settings

noi-techpark/webcomp-tourism-skiinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tourism Skiinfo

REUSE Compliance REUSE status CI/CD

A web component to display a list and details of skiareas located in South Tyrol.

Usage

<script src="./odh-tourism-skiinfo.min.js"></script>
<odh-tourism-skiinfo></odh-tourism-skiinfo>

Attributes

content-id-list

List of content Ids separated by a comma. Example: "1,2,3"

Type: String Default: null

To find content IDs of the content types shown under content-type go to https://tourism.opendatahub.com/swagger and look at the categories Activity, Poi, and Gastronomy. Make sure that the content type and the IDs match, otherwise you will get an empty result.

language

Language of the data

Type: string
Options: ["de", "en", "it"] Default: "de"

page-size

Number of items that are shown in one page

Type: Number Default: 20

Getting started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

To build the project, the following prerequisites must be met:

  • ToDo: Check the prerequisites
  • Node 12 / NPM 6

For a ready to use Docker environment with all prerequisites already installed and prepared, you can check out the Docker environment section.

Source code

Get a copy of the repository:

ToDo: git clone https://github.com/noi-techpark/webcomp-tourism-skiinfo.git

Change directory:

ToDo: cd webcomp-tourism-skiinfo/

Dependencies

Download all dependencies:

npm install

Build

Build and start the project:

npm run start

The application will be served and can be accessed at http://localhost:8080.

Tests and linting

The tests and the linting can be executed with the following commands:

npm run test
npm run lint

Deployment

To create the distributable files, execute the following command:

npm run build

After the build the web-component can be tested by opening /dist/demo.html

Docker environment

For the project a Docker environment is already prepared and ready to use with all necessary prerequisites.

These Docker containers are the same as used by the continuous integration servers.

Installation

Install Docker (with Docker Compose) locally on your machine.

Dependenices

First, install all dependencies:

docker-compose run --rm app /bin/bash -c "npm install"

Start and stop the containers

Before start working you have to start the Docker containers:

docker-compose up --build --detach

After finished working you can stop the Docker containers:

docker-compose stop

Running commands inside the container

When the containers are running, you can execute any command inside the environment. Just replace the dots ... in the following example with the command you wish to execute:

docker-compose run --rm app /bin/bash -c "..."

Some examples are:

docker-compose run --rm app /bin/bash -c "npm run test"

Information

Support

For support, please contact [email protected].

Contributing

If you'd like to contribute, please follow the following instructions:

  • Fork the repository.

  • Checkout a topic branch from the development branch.

  • Make sure the tests are passing.

  • Create a pull request against the development branch.

A more detailed description can be found here: https://github.com/noi-techpark/documentation/blob/master/contributors.md.

Documentation

More documentation can be found at https://opendatahub.readthedocs.io/en/latest/index.html.

Boilerplate

The project uses this boilerplate: https://github.com/noi-techpark/webcomp-boilerplate.

License

The code in this project is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 license. See the LICENSE.md file for more information.

REUSE

This project is REUSE compliant, more information about the usage of REUSE in NOI Techpark repositories can be found here.

Since the CI for this project checks for REUSE compliance you might find it useful to use a pre-commit hook checking for REUSE compliance locally. The pre-commit-config file in the repository root is already configured to check for REUSE compliance with help of the pre-commit tool.

Install the tool by running:

pip install pre-commit

Then install the pre-commit hook via the config file by running:

pre-commit install

About

A webcomponent which displays all information about a skiarea in a quick view

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages