Skip to content

Latest commit

 

History

History
59 lines (46 loc) · 1.79 KB

CONTRIBUTING.md

File metadata and controls

59 lines (46 loc) · 1.79 KB

How To Contribute

  • Most work happens in sub modules. These are modules prefixed with "turf-".
  • If you would like to propose a new feature, open an issue in Turfjs/turf.
  • Always include tests. We use tape.
  • Turf modules are small, containing a single exported function.
  • GeoJSON is the lingua franca of Turf. It should be used as the data structure for anything that can be represented as geography.
  • Avoid large dependencies at all costs.
  • Turf is used in a wide range of places. Make sure that your code can run in the browser (ie: don't make calls to external services, don't hit the filesystem, etc.).
  • The README.md files in packages/turf-<module> are automatically generated from the JSDocs of the index.js. Please modify the JSDocs instead of modifying the README.md files directly. To update/create the README.md execute ./scripts/generate-readme or run npm run docs from the root TurfJS directory.

Code Style

To ensure code style at the turf module level, run

$ npm test

Structure of a turf module

turf-<module>
│   index.js
│   index.d.ts
│   bench.js
│   test.js
|   types.ts
│   package.json
│   README.md
│   LICENSE
│
└───tests
    │
    ├───in
    │   points.geojson
    │
    └───out
        points.geojson

Publishing

Install lerna:

$ npm install -g [email protected]

Publish a test release:

$ lerna publish --canary