https://github.com/ianmackenzie/elm-units-prefixed
Prefixed version of elm-units for resolving module name conflicts
https://github.com/ianmackenzie/elm-units-prefixed
Last synced: about 2 months ago
JSON representation
Prefixed version of elm-units for resolving module name conflicts
- Host: GitHub
- URL: https://github.com/ianmackenzie/elm-units-prefixed
- Owner: ianmackenzie
- License: bsd-3-clause
- Created: 2020-09-15T21:02:14.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-06-21T19:45:29.000Z (almost 2 years ago)
- Last Synced: 2025-03-14T20:13:10.710Z (about 2 months ago)
- Language: Elm
- Size: 130 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `elm-units-prefixed`
This is a [prefixed](https://github.com/pd-andy/elm-package-prefixer) version of
[elm-units](https://package.elm-lang.org/packages/ianmackenzie/elm-units/latest/).
You should only need this if you run into module name conflicts trying to use
`elm-units` directly.For example, if you want to use both `elm-units` and [`elm-visualization`](https://package.elm-lang.org/packages/gampleman/elm-visualization/latest/)
in an app that you are developing, you will get a compiler error if you ever try
to write```elm
import Force
```since both `elm-units` and `elm-visualization` define a `Force` module and
there is [currently no way to tell the compiler which one you want](https://github.com/elm/compiler/issues/1625).
By using using this package instead of the base `elm-units` package, you can
write```elm
import Force
```to get the `Force` module from `elm-visualization` and
```elm
import Units.Force
```to get the `Force` module from `elm-units`.
Importantly, this is not a _fork_ of `elm-units` - types declared in this
package are simply aliases for the underlying `elm-units` types, and functions
are simply aliases for `elm-units` functions. This means that if you use this
package you can still safely interoperate with other packages that use
`elm-units` directly.## Updating this package
Current approach: check out both this repository and [elm-package-prefixer](https://github.com/hayleigh-dot-dev/elm-package-prefixer),
then from within the `elm-package-prefixer` checkout run to```
npm install
npm run build
chmod +x index.js
./index.js -n ianmackenzie/elm-units -t latest -a ianmackenzie -p Units -d /path/to/elm-units-prefixed/src/
```