This project contains the map web component for the NOI Hackathon BZ project from team "Stonks".
We wanted to create a reusable and independent component. Using this webcomponent, a developer can easily integrate it into any website. The main data sources for the components are from the Open Data Hub project.
To create more structured and mantainable webcomponents we used Polymer, more specifically the lit-element implementation.
CSS styles are transpiled using Sass.
We are usign Webpack to create the bundles.
To work on the project, you'll need global installations of:
- Node (v11.9.0)
- Yarn (v1.15.2)
Later versions of the same tools should also work.
A step by step series of examples that tell you how to get a development env running
Install yarn project's dependencies
yarn
yarn start
This will watch the files in every package configured in the right way to create a Webpack bundle.
Build all widgets using Webpack's production
config:
yarn build
The destination for the resulting code will be the dist
folder, located at the root of the project.
This will serve the "work in progress" website at http://0.0.0.0:8000/.
To deploy the webcomponents, take the production bundle created with the yarn build
command and use it as a normal javascrip script.
We suggest deploying them on a CDN, rather than hardcoding them inside a project, so that future fixes and enhancements of the webcomponents are more easily distributed.