README.md (1518B) download
1# Sort Imports for [D](https://dlang.org/)
2
3`sortimport-d` can sort your dozens of `import`'s in a `.d` file (no matter where)
4
5## Installation
6
7### Prerequirements
8
9- [`dub`](https://dub.pm/)
10- [`dmd`](https://dlang.org/)
11
12### Building
13
14Get the repository with `git` and compile everything with `dub`
15```
16$ git clone https://github.com/friedelschoen/importsort-d
17$ cd importsort-d
18$ dub build
19```
20
21If everything went fine, there should be a binary at `bin/importsort-d`.
22
23Copy this into a directory included in `$PATH` (`/usr/bin` for example) to make this command working global.
24
25## Usage
26
27```
28$ importsort-d [--inline [--keep]] [--out <output>] [--original] [--special] [<input>]
29```
30
31> `input` may be omitted or set to `-` to read from STDIN
32
33| option | description |
34| --------------------- | ---------------------------------------------- |
35| `-i, --inline` | changes the input |
36| `-k, --keep` | keeps a backup of the input |
37| `-o, --output <path>` | writes to `path` rather then writing to STDOUT |
38| - | |
39| `-r, --original` | sorts by original rather then the binding |
40| `-s, --special` | public and static imports first |
41
42
43## License
44
45This whole project is licensed under the beautiful terms of the `zlib-license`.
46
47Further information [here](LICENSE)
48
49> made with love and a lot of cat memes