Understand the Elm npm package structure
mainThe Elm installer is distributed via npm using two types of packages:
- Main npm package: Named
elm. This is the package end-users install. - Binary npm packages: Scoped packages for specific platforms (e.g.,
@elm_binaries/darwin_arm64).
The main package uses optionalDependencies to include binary packages. When a user installs elm, npm identifies the user's OS and CPU and installs only the matching binary package. If no match is found, the main package's install script provides an error message.