Reformat folder structure (#50)

This commit is contained in:
Vahid Panjganj 2017-07-10 18:22:40 +01:00 committed by GitHub
parent af252f21d7
commit f616706f68

View File

@ -273,12 +273,11 @@ Before using a package, check its GitHub. Look for the number of open issues, da
## 6. Structure and Naming <a name="structure-and-naming"></a>
* Organize your files around product features / pages / components, not roles. Also, place your test files next to their implementation.
_why:_
> Instead of a long list of files You will create small modules that encapsulate one responsibility including its test and so on. It gets much easier to navigate through and things can be found at a glance
**Bad**
```
**Bad**
```
.
├── controllers
| ├── product.js
@ -286,11 +285,11 @@ Before using a package, check its GitHub. Look for the number of open issues, da
├── models
| ├── product.js
| └── user.js
```
```
**Good**
**Good**
```
```
.
├── product
| ├── index.js
@ -300,9 +299,11 @@ Before using a package, check its GitHub. Look for the number of open issues, da
| ├── index.js
| ├── user.js
| └── user.test.js
```
```
_why:_
> Instead of a long list of files You will create small modules that encapsulate one responsibility including its test and so on. It gets much easier to navigate through and things can be found at a glance
* Put your additional test files to a separate test folder to avoid confusion.
_why:_