1.0.8 • Published 6 years ago

elm-impfix v1.0.8

Weekly downloads
167
License
MIT
Repository
github
Last release
6 years ago

elm-impfix

Command-line tool to remove unused imports from Elm modules.

Install

$ npm install -g elm-impfix

Usage

$ elm-impfix MyModule.elm -o ../build/MyModule.elm

The use case is explained on the Github page.

Flags

Output (optional)

$ elm-impfix MyModule.elm -o path/to/output.elm

Defaults to name_Impfix.ext (if source = name.ext). Use "/" in paths.

Qualifying unqualified imports (optional)

$ elm-impfix MyModule.elm -q path/to/ImportedModule.elm
$ elm-impfix MyModule.elm -q "Imported1.elm Imported2.elm"

Makes unqualified imports explicit ("import ImportedModule exposing (..)" > "import ImportedModule exposing (this, that)").

Wildcards

All params support wildcards:

$ elm-impfix "*.elm"  -o "../build/*.*"  -q "./Imports/*.elm"

Wildcard params must be quoted.

To overwrite all source files, use the -r (--replace) flag. To recursively overwrite all .elm files in a folder, use

elm-impfix "folder/**/*.elm" -r

To exclude some files from the output wildcard, use -x (--exclude):

elm-impfix "folder/**/*.elm" -r -x "folder/elm-stuff/**/*.*"

Bugs

Bug reports are welcome and likely.

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago