1.0.0 • Published 3 years ago

fourwings-aggregate v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

Publish to npm

This monorepo hosts frontend packages and applications of the GlobalFishingWatch ecosystem.

Packages

All of them availables with the @globalfishingwatch/ prefix:

api-clientJS library to simplify GFW API login and resources fetch
api-typesAPI typescript schema definitions
data-transformsSet ot shared tools for data transformations
dataviews-clientApi-client wrapper to fetch and edit dataviews and associated datasets/data
layer-composerOrchestrates various Layer Generators to generate a Mapbox GL Style document
ocean-areasSmall library to get ocean area / eez names by viewport or by text search
pbf-decodersPBF custom responses parsers
react-hooksSet of hooks to use libraries easily in react
timebarTimebar component, not many more to say
ui-componentsReusable atoms components kit

Applications

amatheaMarine reserve areas proyect
fishing-mapVersion 3.0 of the fishing map project
temporalgrid-demoCRA to show how new custom mapbox-gl format development goes
dataviews-editorSimple interface to edit dataviews
sandboxPlayground to use packages without releasing

Other utils

configShared generic build config as tsconfig, rollup or postcss
lintingDefine eslint prettier and stylelint configurations

See also

Mapbox GL / react-map-gl forks

We maintain our own forks of react-map-gl and Mapbox GL to handle gridded temporal data (see temporalgrid branches on both repos)

LayerComposer / Dataviews / Workspaces

See: From WebGL triangles to Dataviews - Organizing visualization of data at GFW

Dependencies

The repo is using yarn workspaces so npm is not suported yet, to install yarn follow this instructions

Install a new dependency

For all packages:

yarn add npm-package -W

Only for a specific package

yarn lerna add npm-package --scope=@scope/my-package

Installation

To install all packages dependencies just run:

yarn

Developmment

There is, for now, 3 package.json entry points to run the project:

  • Packages, to start the build of every package run:
yarn start:packages
  • Applications, to start any of them run;
yarn start:dataviews
yarn start:sandbox

To ensure git flow process, master branch will be protected to force opening PR to every change desired. For now, the only one strong recommendation is to tag every PR to prepare the changelog automatically.

Building

To test all packages builds process run, useful to test everything works well before publishing.

yarn build

Publishing

Using changesets and its github bot to versioning, tag and generate the changelog on every package. See an example of bot usage

This will read the packages included in the changeset and open a new PR with the packages affected. Once this PR is merged, a github action will publish in npm automatically.

If you prefer to do it locally you could run

yarn changesets

and follow the steps to generate a changeset release, once merged to develop the github action will deploy to npm automatically.