Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eeue56/elm-help
https://github.com/eeue56/elm-help
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/eeue56/elm-help
- Owner: eeue56
- License: bsd-3-clause
- Created: 2018-01-21T15:49:11.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-26T00:49:57.000Z (almost 7 years ago)
- Last Synced: 2024-11-14T10:08:54.541Z (2 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-help
Show information about a package, a module, or a function.
# Installation
```
npm install -g elm-help
```# Usage
```
Provide a package name and I'll tell about that package. By default, looks up
elm-package.json in the current directoryOptions:
--package, -p An Elm package, for example elm-lang/core
--module, -m A module inside the package, for example Maybe
--name, -n An exposed name, for example withDefault
--version, -v A version of a package, for example 1.0.0 or latest
--style Enable syntax highlighting [boolean] [default: true]
-h, --help Show help [boolean]```
## Example
By default, it will just look up docs from the package in the current directory
```
noah@noah-ThinkPad-T470s:~/dev/elm-html-test$ elm-help --name style
===============================================
| Module: /home/noah/dev/elm-html-test/src/Test/Html/Selector.elm
===============================================style : List ( String, String ) -> Selector
Matches elements that have all the given style properties (and possibly others as well).import Html
import Html.Attributes as Attr
import Test.Html.Query as Query
import Test exposing (test)
import Test.Html.Selector exposing (classes)import Html
import Html.Attributes as Attr
import Test.Html.Query as Query
import Test exposing (test)
import Test.Html.Selector exposing (classes)
test "the Reply button has red text" <|
\() ->
Html.div []
[ Html.button [ Attr.style [ ( "color", "red" ) ] ] [ Html.text "Reply" ] ]
|> Query.has [ style [ ( "color", "red" ) ] ]
```You can specify libraries like this:
```
$ elm-help --package eeue56/elm-flat-matrix --name power
===============================================
| Module: Matrix.Extra
===============================================power : Matrix.Matrix number -> Matrix.Matrix number -> Maybe.Maybe (Matrix.Matrix number)
element-wise power of elements
```