Commit 4ee1960
authored
Crafting: Programmatically run generator from bin script (#125)
## Checklist
- Contains unit tests ❌
- Contains breaking changes ❌
- Compatible with: MX 7️⃣, 8️⃣, 9️⃣
- Did you update version and changelog? ✅
- PR title properly formatted (`[XX-000]: description`)? ✅
## This PR contains
- [ ] Bug fix
- [ ] Feature
- [x] Refactor
- [ ] Documentation
- [ ] Other (describe)
## What is the purpose of this PR?
There was a noticeable startup time when generating a widget using `npx
@mendix/generator-widget`. This was due to the bin script installing
yeoman and the generator globally each time.
## Relevant changes
- The generator is run using `yeoman-environment` (which the `yo` cli
tool is a wrapper for).
- Dependencies with vulnerabilities have been patched using `npm audit`
## What should be covered while testing?
Generating a widget using the `bin.js` script.4 files changed
Lines changed: 2024 additions & 3339 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
13 | 21 | | |
14 | 22 | | |
15 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | 2 | | |
5 | | - | |
6 | 3 | | |
7 | 4 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
11 | 9 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 10 | + | |
| 11 | + | |
0 commit comments