Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

1) Installation and build

xem edited this page Jan 12, 2022 · 12 revisions

Clone the project

  • Clone the Erdapfel repository from Github: https://github.com/Qwant/erdapfel

  • Add a .env file in the root folder to set up the environment variables.

  • The env file below is for Github contributors:

TILEVIEW_mapStyle_baseMapUrl=["https://www.qwant.com/maps/tiles/ozbasemap/{z}/{x}/{y}.pbf"]
TILEVIEW_mapStyle_poiMapUrl=["https://www.qwant.com/maps/tiles/ozpoi/{z}/{x}/{y}.pbf"]
TILEVIEW_services_geocoder_url=https://www.qwant.com/maps/detail/v1/autocomplete
TILEVIEW_services_idunn_url=https://www.qwant.com/maps/detail
TILEVIEW_system_baseUrl=/
TILEVIEW_direction_enabled=true
TILEVIEW_direction_service_api=mapbox
TILEVIEW_direction_service_apiBaseUrl=https://api.mapbox.com/directions/v5/mapbox/
TILEVIEW_direction_service_token=pk.eyJ1IjoiZXhhbXBsZXMiLCJhIjoiY2p0MG01MXRqMW45cjQzb2R6b2ptc3J4MSJ9.zA2W0IkI0c6KaAhJfk9bWg
TILEVIEW_direction_publicTransport_enabled=false
TILEVIEW_category_enabled=true
TILEVIEW_covid19_enabled=false
TILEVIEW_services_geocoder_useNlu=true
TILEVIEW_userFeedback_enabled=true
TILEVIEW_burgerMenu_products=true
TILEVIEW_server_unsupportedBrowsers_redirect=true
TILEVIEW_survey_surveyApiUrl=https://api.qwant.com/v2/api/ux/surveys
  • The business env files (dev, prod) are available on Gitlab, and are only useable by Qwant's employees.

Build the project

  • Open a terminal (on Windows 10, use WSL2):
> npm install 
> npm run start
  • Open a second terminal:
> npm run build

FAQ

How to make a "dev" build?

With code watcher:

> npm run watch

Without code watcher:

> webpack --config build/webpack.config.js --mode=development

More generally, you can see all the available build scripts in package.json

How to fix end-of-line errors on the whole project?

> npm run prettier:write

(It will also prettify/lint all the source code of the project)

Clone this wiki locally