diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..52167bd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build/farmOS-map.js diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4d83fdc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +# Inherit from the official node.js image. +FROM node + +# Set the working directory to /usr/src/app. +WORKDIR /usr/src/app + +# Install dependencies. +COPY package.json package.json +RUN npm install + +# Copy source files needed for running npm build. +COPY src/ . diff --git a/README.md b/README.md new file mode 100644 index 0000000..16f62f8 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# farmOS Map + +[![Licence](https://img.shields.io/badge/Licence-GPL%203.0-blue.svg)](https://opensource.org/licenses/GPL-3.0/) +[![Release](https://img.shields.io/github/release/farmOS/farmOS-map.svg?style=flat)](https://github.com/farmOS/farmOS-map/releases) +[![Last commit](https://img.shields.io/github/last-commit/farmOS/farmOS-map.svg?style=flat)](https://github.com/farmOS/farmOS-map/commits) +[![Twitter](https://img.shields.io/twitter/follow/farmOSorg.svg?label=%40farmOSorg&style=flat)](https://twitter.com/farmOSorg) +[![Chat](https://img.shields.io/matrix/farmOS:matrix.org.svg)](https://riot.im/app/#/room/#farmOS:matrix.org) + +farmOS Map is an [OpenLayers](https://openlayers.org/) map for farmOS. + +For more information on farmOS, visit [farmOS.org](https://farmOS.org). + +## Setup + +1. Clone the repository. +2. Run `./build.sh` +3. Open `build/index.html` in a browser. + +## Maintainers + + * Michael Stenta (m.stenta) - https://github.com/mstenta + +This project has been sponsored by: + + * [Farmier](https://farmier.com) diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..a5d46ff --- /dev/null +++ b/build.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Touch build/farmOS-map.js to ensure that it is owned by this user. +touch build/farmOS-map.js + +# Build the farmos-map Docker image. +sudo docker build -t farmos-map . + +# Build farmOS-map.js with NPM. +sudo docker run -it --rm -v "$PWD/build":/usr/src/app/build farmos-map npm run build diff --git a/build/index.html b/build/index.html new file mode 100644 index 0000000..6352938 --- /dev/null +++ b/build/index.html @@ -0,0 +1,24 @@ + + +
+ +