Common utilities and facades for React and Scala.js
Example running a demo:
sbt semanticUIDemo/fastLinkJS vite -c semantic-ui-demo/vite.config.js
Note that vite should be run from the root directory, but point at the config file for a particular model. To generate/update the vite config for a module use
sbt viteConfigGenerate. It will get stale with every Scala 3 patch release.
To add a new module follow roughly these steps:
- Add the module(s) to the build, and add them to the root aggregate project.
- If there is more than one module (e.g. facade+demo), create an aggregate project for them.
- Add the aggregate (or the sole module) to the projects list. This adds a separate CI job.
yarn add --dev whateverto add the npm dep to the
package.jsonin the root. Except for any type-related dependencies for ScalablyTyped, see the next step.
- Type-related dependencies should be put in a
package.jsonspecific for that module as a normal dep (not a dev dep). This helps to focus ScalablyTyped on generating facades specifically for that dep. Also, make sure to register that
package.jsonwith the dependabot config
This repo uses a single
package.json at the root that is used by all the modules. This ensures that the version of shared dependencies are kept in sync. However, each module has its own
yarn.lock, mostly because this is how ScalaJS Bundler wants it. Unfortunately, this means that all the lockfiles must be kept synchronized.
If a PR is complaining about outdated lockfiles, you can run the "Update lockfiles" workfow on that branch. Lucuma-steward will run
yarn install and
sbt npmInstallDependencies and commit the changes. Of course, you can also run these steps locally and commit.