donejs / donejs/generator-donejs

Generate supermodels inside modlets

Open
#114 5 comments 0 reactions 0 assignees View on GitHub
help wanted p2
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.