donejs / donejs/generator-donejs
Generate supermodels inside modlets
- Dominant language
- JavaScript
- Stars
- 9
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
The current supermodel generator creates a the model and its test in the `models` folder, and a fixture file in the `fixtures` folder as follows:
```
├── todo.js
├── todo_test.js
├── fixtures/
| └── todo.js
```
Unlike components, this does not use `modlets`.
Pros:
- less folders for a dev to work through.
- there's often only a `model` and `model_test` file necessary
- fixtures files are less important as `fixture` is being used more directly within tests or demo pages now.
Cons:
- not consistent with components
- there maybe other files necessary
- there's no individual test page for that model.
## Alternatives
### Modlet with plural fixture
```
├── todo/
| ├── todo.js
| ├── todo_test.js
| ├── test.html
| └── todos.js (this would be the fixture)
```
Considerations:
- this would require something to pluralize the model name.
### Modlet with fixture
```
├── todo/
| ├── todo.js
| ├── todo_test.js
| ├── test.html
| └── todo_fixture.js
```
### Modlet with fixture out
```
├── fixtures/
| └── todo.js
├── todo/
| ├── todo.js
| ├── todo_test.js
| └── test.html
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.