Skip to content

Commit 6792128

Browse files
authored
Merge pull request #34 from mohsenshafiei/dev
Dev
2 parents 31a2b0a + c859be7 commit 6792128

File tree

4 files changed

+89
-39
lines changed

4 files changed

+89
-39
lines changed

CONTRIBUTING.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
## Contributing
2+
3+
#### Reporting Bugs, Enhancements or etc
4+
5+
Before creating bug reports, please check issues list as you might find out that you don't need to create one.
6+
When you are creating a bug report, please include as many details as possible.
7+
8+
> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open
9+
a new issue and include a link to the original issue in the body of your new one.
10+
11+
12+
#### Pull Requests
13+
14+
The team lead is monitoring for pull requests. Your team lead will review your pull request and either merge it,
15+
request changes to it, or close it with an explanation.
16+
17+
*Before submitting a pull request*, please make sure the following is done:
18+
19+
- clone the repository and create your branch from dev branch.
20+
- Run npm install in the repository root.
21+
- If you’ve fixed a bug or added code that should be tested, add tests!
22+
- Ensure the test suite passes (npm run test).
23+
- Format your code with prettier (npm run prettier)
24+
- Make sure your code lints (npm run lint).
25+
- Run the TypeScript type checks.
26+
27+
#### Commits
28+
29+
* Use the present tense ("Add feature" not "Added feature")
30+
* Limit the first line to 72 characters or less
31+
* Reference issues and pull requests liberally after the first line
32+
* Consider starting the branch names:
33+
* `feature/` A new feature
34+
* `bugfix/` A bug fix
35+
* `document/`Documentation only changes
36+
* `style/` Changes that do not affect the code
37+
* `refactor/` A code change that neither fixes a bug or adds a feature
38+
* `performance/` A code change that improves performance
39+
* `test/` Adding missing tests
40+
* Consider starting the commit message with:
41+
* `feat:` A new feature
42+
* `fix:` A bug fix
43+
* `docs:` Documentation only changes
44+
* `style:` Changes that do not affect the code
45+
* `refactor:` A code change that neither fixes a bug or adds a feature
46+
* `perf` A code change that improves performance
47+
* `test` Adding missing tests
48+
* Don't forget to put the <b>DOT</b> at the end of your commit

README.md

Lines changed: 28 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -95,56 +95,49 @@ chain the
9595

9696
`quark-loader` process the `CSS` files and replaced our style with a reference to our declarations. In this way, we can remove repetitive styles from our CSS and make it minimum.
9797

98+
![What actually happens?](/public/assets/process.png)
99+
98100
**style.css**
99101
```css
100-
.container {
102+
.a {
101103
top: 100px;
102-
left: 100px;
103-
right: 100px;
104-
transform: translate(-50%);
105-
float: left;
106104
}
107-
108-
.element {
105+
.b {
106+
top: 100px;
107+
}
108+
.c {
109+
top: 100px;
110+
}
111+
.d {
109112
top: 100px;
110-
border: 2px solid red;
111113
}
112114
```
115+
**Let's review what we get at the end**
113116

114-
**result.css**
115-
```css
116-
.top--100px {
117+
Extracted css file
118+
```CSS
119+
.t7E {
117120
top: 100px;
118121
}
119-
.left--100px {
120-
left: 100px;
122+
.BOO {
121123
}
122-
.right--100px {
123-
right: 100px;
124+
._1dA {
124125
}
125-
.transform--translate-50 {
126-
transform: translate(-50%);
126+
._1rC {
127127
}
128-
.float--left {
129-
float: left;
130-
}
131-
.border--2px-solid-red {
132-
border: 2px solid red;
133-
}
134-
.container {
135-
composes: top--100px;
136-
composes: left--100px;
137-
composes: right--100px;
138-
composes: transform--translate-50;
139-
composes: float--left;
140-
}
141-
.element {
142-
composes: top--100px;
143-
composes: border--2px-solid-red;
128+
._3e1 {
144129
}
145130
```
146-
- Note that at the end you should compile your styles with [css-loader](https://github.com/webpack-contrib/css-loader).
147-
131+
Without `CSS` extraction
132+
```js
133+
exports.locals = {
134+
"top--100px": "t7E",
135+
"a": "BOO t7E",
136+
"b": "_1dA t7E",
137+
"c": "_1rC t7E",
138+
"d": "_3e1 t7E"
139+
};
140+
```
148141
#### Tutorials
149142

150143
[Using Quark-Loader to minimize css files](https://medium.com)

ROADMAP.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
# ROADMAP
1+
### Roadmap
22

3-
### WILL
4-
### WONT
5-
### MIGHT
3+
#### WILL
4+
- Full support of every possible `CSS` styling.
5+
- Reduce rules skips and duplications as much as possible.
6+
- Add different options and custom configuration for a better and customized result.
7+
- Creating a test case bank to make sure everything is working correctly
8+
9+
#### WONT
10+
11+
#### MIGHT
12+
- Integration with other task runners like gulp and etc
13+
14+
***Please note that you can share your ideas about the project and how we can make it better together***

public/assets/process.png

37.8 KB
Loading

0 commit comments

Comments
 (0)