fourwings-aggregate v1.0.0
This monorepo hosts frontend packages and applications of the GlobalFishingWatch ecosystem.
Packages
All of them availables with the @globalfishingwatch/
prefix:
api-client | JS library to simplify GFW API login and resources fetch |
api-types | API typescript schema definitions |
data-transforms | Set ot shared tools for data transformations |
dataviews-client | Api-client wrapper to fetch and edit dataviews and associated datasets/data |
layer-composer | Orchestrates various Layer Generators to generate a Mapbox GL Style document |
ocean-areas | Small library to get ocean area / eez names by viewport or by text search |
pbf-decoders | PBF custom responses parsers |
react-hooks | Set of hooks to use libraries easily in react |
timebar | Timebar component, not many more to say |
ui-components | Reusable atoms components kit |
Applications
amathea | Marine reserve areas proyect |
fishing-map | Version 3.0 of the fishing map project |
temporalgrid-demo | CRA to show how new custom mapbox-gl format development goes |
dataviews-editor | Simple interface to edit dataviews |
sandbox | Playground to use packages without releasing |
Other utils
config | Shared generic build config as tsconfig, rollup or postcss |
linting | Define 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.
3 years ago