ToDo: Description of the project. What does this web component provide? Which data of the Open Data Hub will be shown? Why is it sooo coool ;-)
ToDo: Include the webcompscript file dist/webcomp-boilerplate.min.js
in your HTML and define the web component like this:
<webcomp-boilerplate xxx="test" yyy="2"></webcomp-boilerplate>
The description of the parameter xxx.
Type: string Options: "test", "123"
The description of the parameter yyy.
Type: int
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
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.
Get a copy of the repository:
ToDo: git clone https://github.com/noi-techpark/project-name.git
Change directory:
ToDo: cd project-name/
Download all dependencies:
npm install
Build and start the project:
npm run start
The application will be served and can be accessed at http://localhost:8080.
The tests and the linting can be executed with the following commands:
npm run test
npm run lint
To create the distributable files, execute the following command:
npm run build
If you want to test the webcomponent on a local instance of the webcomponent store to make sure that it will run correctly also on the real store. You can also access the webcomponent running in a simple separated docker container outside of the store.
If you have already developed your webcomponent and now want to test it on a local instance of the store, just copy .env.example
, docker-compose.yml
, wcs-manifest.json
and infrastructure/docker
into your root folder. Adjust your package.json
and wcs-manifest.json
files as described on the top of this readme. Then follow the instructions below.
For accessing the webcomponent in a separated docker in the browser you will need a server (e.g. webpack dev-server) that is hosting a page which includes the webcomponent tag, as well as the script defining it. This page needs to be hosted on port 8080 as specified in your docker-compose file.
Install Docker (with Docker Compose) locally on your machine.
- Create a .env file:
cp .env.example .env
- [Optional] Adjust port numbers in .env if they have conflicts with services already running on your machine
- Start the store with:
docker-compose up -d
- Wait until the containers are running. You can check the current state with:
docker-compose logs --tail 500 -f
- Access the store in your browser on:
localhost:8999
- Access webcomponent running in separated docker in your browser on:
localhost:8998
- Increase version number WC_VERSION in your .env file
- Then run:
docker-compose up wcstore-cli
docker-compose stop
[sudo] rm -f workspace
docker-compose rm -f -v postgres
For support, please contact [email protected].
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.
More documentation can be found at https://opendatahub.readthedocs.io/en/latest/index.html.
The project uses this boilerplate: https://github.com/noi-techpark/webcomp-boilerplate.
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.