Skip to content

Latest commit

 

History

History
78 lines (50 loc) · 2.49 KB

CONTRIBUTING.md

File metadata and controls

78 lines (50 loc) · 2.49 KB

Contributing Guide for @opendatasoft/api-client

Please note we have a Code of Conduct, please follow it in all your interactions with the project.

Contributions are welcome and are greatly appreciated! Every little bit helps, and credit will always be given.

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Build

This project uses Rollup as a bundler through TSDX.

To watch this package:

npm run watch # or yarn run watch

This builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.

To do a one-off build, use npm run build or yarn build.

Configuration

Code quality is set up for you with prettier, husky, and lint-staged.

Jest

Jest tests are set up to run with npm test or yarn test.

You can also have test coverage with npm run test:coverage. And rerun test as you work with npm run test:watch.

Bundle Analysis

size-limit with npm run size and visualize the bundle with npm run analyze.

Optimizations

Please see the main tsdx optimizations docs. In particular, know that you can take advantage of development-only optimizations:

// ./types/index.d.ts
declare var __DEV__: boolean;

// inside your code...
if (__DEV__) {
  console.log('foo');
}

Module Formats

CJS, ESModules, and UMD module formats are supported.

The appropriate paths are configured in package.json and dist/index.js accordingly. Please report if any issues are found.

Named Exports

Per Palmer Group guidelines, always use named exports..

Resources