Skip to content

Commit

Permalink
Imporove docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxcarlson committed Jun 13, 2024
1 parent 292e5f9 commit f4b6f67
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions src/Install/Import.elm
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
module Install.Import exposing (init, makeRule, withAlias, withExposedValues)

{-| Add import statements to a given module.
For example, to add `import Foo.Bar` to the `Frontend` module, you can use the following configuration:
Examples:
```
Install.Import.init "Frontend" "Foo.Bar"
|> Install.Import.makeRule
```
This adds `import Foo.Bar` to the `Frontend` module.
|> Install.Import.makeRule
To add the statement `import Foo.Bar as FB exposing (a, b, c)` to the `Frontend` module, do this:
```
Install.Import.init "Frontend" "Foo.Bar"
|> Install.Import.withAlias "FB"
|> Install.Import.withExposedValues [ "a", "b", "c" ]
|> Install.Import.makeRule
```
This adds `import Foo.Bar as FB exposing (a, b, c)` to the `Frontend` module.
```
|> Install.Import.withAlias "FB"
|> Install.Import.withExposedValues [ "a", "b", "c" ]
|> Install.Import.makeRule
@docs init, makeRule, withAlias, withExposedValues
Expand Down

0 comments on commit f4b6f67

Please sign in to comment.