Skip to content

Commit

Permalink
feat: add make file, release, git tag, doc
Browse files Browse the repository at this point in the history
  • Loading branch information
hophacker authored and hophacker committed Feb 23, 2022
1 parent b055a7c commit 84fb9bc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
VERSION := v0.2.0
RELEASE_NOTE := "Add CICD and Makefile"
git-tag:
git tag -a $(VERSION) -m $(RELEASE_NOTE)
git push github $(VERSION)

release: git-tag
goreleaser release
20 changes: 13 additions & 7 deletions readme.md → README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# CSS CHECKER

### Basic commands
## Build & Release
* `make build`
* `make release`

## Usage

#### Basic commands

- `-help`: prints help and exits
- `-colors`: whether to check colors (default true)
Expand All @@ -12,34 +18,34 @@
- `-sim`: whether to check similar css classes (>=80% && < 100%) (default true)
- `-version`: prints current version and exits

### Output:
#### Output:

![image.png](https://assets.ruilisi.com/t=yDNXWrmyg+V6mUzCAG7A==)

### How we get similarities between classes?:
#### How we get similarities between classes?:

0. Hash each line of class (aka. `section` in our code), Generate map: `LineHash -> Section`.
1. Convert map `LineHash -> Section` => `[SectionIndex1][SectionIndex2] -> Duplicated Hashes`, n for identical hash, section stands for css class.
2. In map: `[SectionIndex1][SectionIndex2]` -> `Duplicated Hashes`, number of the duplicated hashes stands for duplicated lines between classes.

### Similarity Check:
#### Similarity Check:

Check the similarity (>=80% && < 100%) between classes. This will print the same line in between classes.

![image.png](https://assets.ruilisi.com/bzljM=P4Mz+dmtHKNvdHtg==)

### Long Script Line Check:
#### Long Script Line Check:

Long scripts can be saved as varirables to make your life easiler. This will only alert when long scriptes are used for more then once.

![image.png](https://assets.ruilisi.com/5bdqZTuLTzJCaGSynA7+2w==)

### Colors Check:
#### Colors Check:

Check colors in HEX/RGB/RGBA/HSL/HSLA that used more then once in your code. As for supporting of diffrent themes and possible future updates of you color set, you may consider to put them as css variables.

![image.png](https://assets.ruilisi.com/iqmnGQHwglb+pxE3kr3L1Q==)

### Duplicated CSS Classes:
#### Duplicated CSS Classes:

Similar to `Similarity Check` but put those classes that are total identical to each other.

0 comments on commit 84fb9bc

Please sign in to comment.