-
Notifications
You must be signed in to change notification settings - Fork 160
Info for Maintainers
Bryan Housel edited this page Aug 27, 2023
·
5 revisions
This page contains useful information for maintainers, including how to clone and build the project.
You don't need to know all of this if you just want to contribute to the index!
- Clone this project, for example:
git clone [email protected]:osmlab/osm-community-index.git
-
cd
into the project folder, - Run
npm install
to install libraries
-
git pull origin --rebase
is a good way to keep your local copy of the code updated - rerun
npm install
whenever dependencies are updated inpackage.json
-
npm run build
- Takes a few seconds and should be run whenever the
resources/*
orfeatures/*
files change - Processes custom locations under
features/**/*.geojson
intodist/featureCollection.json
- Make sure to check in code when done, with something like
git add . && git commit -m 'npm run build'
- Takes a few seconds and should be run whenever the
-
npm run local
- Creates a folder
docs-local/
with anindex.html
andcompleteFeatureCollection.json
for testing - Starts a server listening on
http://localhost:8081
- You can now browse to that address and see your changes in action.
- Creates a folder
-
npm run dist
- Takes a few seconds and generates all the files in
dist/*
- Make sure to check in code when done, with something like
git add . && git commit -m 'npm run dist'
- Projects which pull osm-community-index data from GitHub (such as https://openstreetmap.community) will appear updated soon after
npm run dist
- Other downstream projects may pull from
dist/*
too
- Takes a few seconds and generates all the files in
To publish an official release, follow the steps in the Release Checklist.
- Official releases are stable forever and available via NPM or on CDNs like JSDelivr
- Projects which pull osm-community-index from NPM or a CDN (such as Rapid) will appear updated soon after publishing
- Publishing the code to NPM requires rights to run
npm publish
-
npm run lint
- Checks the JavaScript code for correctness -
npm run test
- Runs tests agains the Javascript code -
npm run
- Lists other available commands