Giter Site home page Giter Site logo

Geoblocks

Description

Geoblocks are pieces of code:

  • with minimal dependencies choosing versions;
  • independant;
  • easy to use;
  • tested and documented testing;
  • maintained by the people who use them;
  • written in plain ES6 or typescript;
  • distributed as ES6 modules + typescript d.ts typing.

Github / Npm

Each block is maintained in its own independant github repository in the github geoblocks organisation.

Blocks are published on npm in the npm geoblocks organisation.

Usage

The proj block exposes OpenLayers projections. To use them:

  • npm i --save @geoblocks/proj
  • import EPSG_2056 from '@geoblocks/proj/src/EPSG_2056.js';
  • you are done!

Contributing

  • Create issue / PR in the block;
  • A block maintainer will review and merge;
  • To create new blocks get in touch with us.

Choosing dependency versions

Each block has a package.json file specifying the dependencies of the block. For each dependency, the block author must specify a range starting at the smallest usable version.

Let's take an example. The proj block depends on OpenLayers 5. It is usable with all the versions in the range [5.3.0, current] so the package.json file must contain:

ol": ">=5.3.0",

During the CI tests, both version 5.3.0 and the latest version are tested. Here is how it is handled.

Typing

Blocks can be written as plain ES6 modules. But to catch errors early and to benefit from modern Javascript editing in code editors like VSCode, it is required to:

  • publish typescript definition files (d.ts);
  • define typescript interfaces when implementing a generic feature.

With proper annotations, note that plain ES6 modules blocks can use typescript as a typechecker.

Testing

  • enable CI with tests and coverage example with JEST;
  • publish a documentation;
  • eventually publish examples.

See the sources block.

geoblocks's Projects

d3-helper icon d3-helper

D3 helper to draw and manage base of simple charts

ga-search icon ga-search

A web component element to access the GeoAdmin search API

legacylib icon legacylib

Tool to build a legacy library from source code using ES6 modules

ngv icon ngv

Framework for modern geospatial applications

oidcjs icon oidcjs

A simple client library implementing the Openid Connect `code` flow, with optional `PKCE`

print icon print

This project provides low level functionnalities for rendering OpenLayers layers to images of arbitrary resolution.

proj icon proj

Reusable definitions of OpenLayers projections

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.