rustywind 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.MD +70 -53
- package/lib/postinstall.js +1 -1
- package/package.json +1 -1
package/README.MD
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
# RustyWind [](https://github.com/avencera/rustywind/actions?query=workflow%3A%22Mean+Bean+CI%22) [](https://badge.fury.io/js/rustywind)
|
|
3
2
|
|
|
4
3
|
## Install
|
|
5
4
|
|
|
@@ -11,91 +10,109 @@ or
|
|
|
11
10
|
|
|
12
11
|
`npm install -g rustywind`
|
|
13
12
|
|
|
14
|
-
or
|
|
13
|
+
or
|
|
15
14
|
|
|
16
15
|
Install from a github release:
|
|
17
16
|
|
|
18
17
|
`curl -LSfs https://avencera.github.io/rustywind/install.sh | sh -s -- --git avencera/rustywind`
|
|
19
18
|
|
|
20
|
-
or
|
|
19
|
+
or
|
|
21
20
|
|
|
22
21
|
Download a release directly from github: [github.com/avencera/rustywind/releases](https://github.com/avencera/rustywind/releases)
|
|
23
22
|
|
|
23
|
+
or
|
|
24
|
+
|
|
25
|
+
You can use the dockerized version
|
|
26
|
+
|
|
27
|
+
`docker run --rm -v $PWD:/app avencera/rustywind:latest <rustywind arguments>`
|
|
28
|
+
|
|
24
29
|
## Usage
|
|
25
30
|
|
|
26
31
|
Run rustywind with a path to output updated file contents to the terminal:
|
|
27
|
-
|
|
32
|
+
|
|
33
|
+
- `rustywind .`
|
|
28
34
|
|
|
29
35
|
If you want to reorganize all classes in place, and change the files run with the `--write` flag
|
|
30
|
-
|
|
36
|
+
|
|
37
|
+
- `rustywind --write .`
|
|
31
38
|
|
|
32
39
|
Run rustywind with a path and the `--dry-run` to get a list of files that will be changed:
|
|
33
|
-
- `rustywind --dry-run .`
|
|
34
40
|
|
|
35
|
-
|
|
36
|
-
- `rustywind --help`
|
|
41
|
+
- `rustywind --dry-run .`
|
|
37
42
|
|
|
38
|
-
|
|
43
|
+
Run rustywind on your STDIN:
|
|
39
44
|
|
|
40
|
-
|
|
41
|
-
vscode plugin. This is a CLI tool that will look through your project and sort all [Tailwind CSS](https://tailwindcss.com) classes.
|
|
45
|
+
- `echo "<FILE CONTENTS>" | rustywind --stdin`
|
|
42
46
|
|
|
43
|
-
|
|
47
|
+
Run in CI, exit with error if unsorted classes are found:
|
|
48
|
+
|
|
49
|
+
- `rustywind --check-formatted .`
|
|
50
|
+
|
|
51
|
+
Run RustyWind with a custom sorter. The `config_file.json` should have a top level entry of `sortOrder`
|
|
52
|
+
which is an array with the classes listed in the order you want them sorted.
|
|
44
53
|
|
|
45
|
-
|
|
54
|
+
- `rustywind --config-file config_file.json`
|
|
46
55
|
|
|
47
|
-
|
|
56
|
+
```shell
|
|
57
|
+
RustyWind 0.14.0
|
|
58
|
+
Praveen Perera <praveen@avencera.com>
|
|
48
59
|
|
|
49
|
-
|
|
50
|
-
|
|
60
|
+
USAGE:
|
|
61
|
+
Run rustywind with a path to get a list of files that will be changed
|
|
62
|
+
rustywind . --dry-run
|
|
51
63
|
|
|
52
|
-
|
|
53
|
-
|
|
64
|
+
If you want to reorganize all classes in place, and change the files run with the `--write` flag
|
|
65
|
+
rustywind --write .
|
|
54
66
|
|
|
55
|
-
|
|
67
|
+
To print only the file names that would be changed run with the `--check-formatted` flag
|
|
68
|
+
rustywind --check-formatted .
|
|
56
69
|
|
|
57
|
-
|
|
70
|
+
If you want to run it on your STDIN, you can do:
|
|
71
|
+
echo "<FILE CONTENTS>" | rustywind --stdin
|
|
58
72
|
|
|
59
|
-
|
|
73
|
+
rustywind [FLAGS] <PATH>
|
|
60
74
|
|
|
61
|
-
|
|
62
|
-
|
|
75
|
+
ARGS:
|
|
76
|
+
<PATH>... A file or directory to run on
|
|
63
77
|
|
|
64
|
-
|
|
78
|
+
OPTIONS:
|
|
79
|
+
--allow-duplicates
|
|
80
|
+
When set, RustyWind will not delete duplicated classes
|
|
65
81
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
3. ~~Get all contents from the list of files 1 by 1~~ [#2](https://github.com/avencera/rustywind/pull/2)
|
|
69
|
-
4. ~~Run regex on all file contents and get all class names~~ [#3](https://github.com/avencera/rustywind/pull/3)
|
|
70
|
-
5. ~~Figure out how to sort class names using sorter array~~ [#4](https://github.com/avencera/rustywind/pull/4)
|
|
71
|
-
6. ~~Replace old class names with new list of class names~~ [#5](https://github.com/avencera/rustywind/pull/5)
|
|
72
|
-
7. ~~Save file~~ [#6](https://github.com/avencera/rustywind/pull/6)
|
|
73
|
-
8. ~~Release via NPM~~ (available via [npm](https://www.npmjs.com/package/rustywind) `npm install rustywind -g`)
|
|
74
|
-
- ~~[How to Distribute a Rust Binary on NPM](https://dev.to/kennethlarsen/how-to-distribute-a-rust-binary-on-npm-75n)~~
|
|
75
|
-
- ~~[Trust Repo](https://github.com/japaric/trust)~~
|
|
76
|
-
- ~~[Example](https://github.com/kennethlarsen/baelte-npm)~~
|
|
82
|
+
--check-formatted
|
|
83
|
+
Checks if the files are already formatted, exits with 1 if not formatted
|
|
77
84
|
|
|
78
|
-
|
|
85
|
+
--config-file <CONFIG_FILE>
|
|
86
|
+
When set, RustyWind will use the config file to derive configurations. The config file
|
|
87
|
+
current only supports json with one property sortOrder,e.g. { "sortOrder": ["class1",
|
|
88
|
+
...] }
|
|
79
89
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
3. ~~Add `--write` option which will change the files, change default to printing results to the terminal~~ [#8](https://github.com/avencera/rustywind/pull/8)
|
|
90
|
+
--custom-regex <CUSTOM_REGEX>
|
|
91
|
+
Uses a custom regex instead of default one
|
|
83
92
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
2. ~~Add `--dry-run` option to print out all changes to console~~ [c975d1](https://github.com/avencera/rustywind/commit/c975d1f041f95b45e15760ccded24dbf62bf1f6f)
|
|
93
|
+
--dry-run
|
|
94
|
+
Prints out the new file content with the sorted classes to the terminal
|
|
87
95
|
|
|
88
|
-
|
|
96
|
+
-h, --help
|
|
97
|
+
Print help information
|
|
89
98
|
|
|
90
|
-
|
|
99
|
+
--ignored-files <IGNORED_FILES>
|
|
100
|
+
When set, RustyWind will ignore this list of files
|
|
91
101
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
2. Add custom regex via CLI args `--custom-regex=...`
|
|
102
|
+
--stdin
|
|
103
|
+
Uses stdin instead of a file or folder
|
|
95
104
|
|
|
96
|
-
|
|
105
|
+
-V, --version
|
|
106
|
+
Print version information
|
|
97
107
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
108
|
+
--write
|
|
109
|
+
Changes the files in place with the reorganized classes
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## What
|
|
114
|
+
|
|
115
|
+
Inspired by [Ryan Heybourn's](https://github.com/heybourn) [headwind](https://github.com/heybourn/headwind)
|
|
116
|
+
vscode plugin. This is a CLI tool that will look through your project and sort all [Tailwind CSS](https://tailwindcss.com) classes.
|
|
117
|
+
|
|
118
|
+
It will also delete any duplicate classes it finds.
|
package/lib/postinstall.js
CHANGED