Skip to content

Conversation

@davenquinn
Copy link
Member

@davenquinn davenquinn commented Feb 13, 2025

This is a major update to the packaging style and contribution approach to this repository.

With UW-Macrostrat/web-components#62 and UW-Macrostrat/web-components#65, we now have packaged versions of all @macrostrat dependencies which are versioned and publicly released (see the @macrostrat org on NPM.
These include shared utilities and web components.

Usage

This change to packaging simplifies the internal structure of this application, removes its reliance on the git submodule workflow for shared dependencies, and streamlines the build toolchain. Unfortunately, many small UI changes will now require a multistage release process (first in web-components, then here).

  • Development of standalone web components can be done in a "Storybook" in the web components repository, allowing us to focus this repository on higher-level state and coupled interactions.
  • In order to test changes locally, a yarn link workflow can be used to directly link to a local version of the web components, as such: yarn link -A -r ../web-components. This will create portal: links in package.json that need to be resolved.
  • Bundling changes:
    • If you want to build packages directly from source for local development, you can add the resolve: { conditions[ 'source'] } directive to vite.config.js
    • There are still some problems with bundling dependencies with CSS. For now we solve them by adding CSS-containing modules to ssr.noExternal. Eventually we may need to find a more permanent fix.

Changes

  • Remove web-components, cesium-viewer, and cesium-martini submodules.
  • Use separately-packaged dependencies for all web components
  • Upgrade Yarn, Vite, and Vike
  • Add Vite css modules plugin to patch odd CSS Modules behavior
  • Move to renamed @macrostrat/svg-map-components and @corelle/svg-map-layers modules
  • Confirm that local development works with yarn link and portal: protocol
  • Small improvements to filter panel
  • Use a more straightforward local method to serve pattern assets from NPM-packaged files
  • Add overzooming support to the development map globe

@davenquinn davenquinn changed the title Simplify dependencies Transition to NPM-packaged dependencies Feb 16, 2025
@davenquinn davenquinn merged commit d393d60 into main Feb 16, 2025
1 check passed
@davenquinn davenquinn deleted the simplify-dependencies branch February 16, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants