Commit 37ed71c
feat: local-first template resolution (cna.config.json + --set flag)
- Remove yargs dependency (ESM-only, breaks CJS bundle); replace with
prompts.override(options) using already-parsed Commander values
- Add --set key=value CLI flag for overriding custom template options
- Add loadTemplateCnaConfig() to core: reads cna.config.json from the
template root directory (not inside template/ subdir)
- Add getTemplateBaseDirPath() to core: resolves base dir without the
template/ subdir detection that getTemplateDirPath() applies
- processNonInteractiveOptions: load cna.config.json and apply initials
(priority: --set > cna.config.json > registry templates.json)
- processInteractiveOptions: merge cna.config.json customOptions with
registry, apply --set as prompt initials
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 8dabd17 commit 37ed71c
7 files changed
Lines changed: 173 additions & 163 deletions
File tree
- packages
- create-awesome-node-app
- src
- create-node-app-core
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
71 | | - | |
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| |||
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
93 | | - | |
| 97 | + | |
94 | 98 | | |
95 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
96 | 113 | | |
97 | 114 | | |
98 | 115 | | |
| |||
103 | 120 | | |
104 | 121 | | |
105 | 122 | | |
106 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
107 | 130 | | |
108 | 131 | | |
109 | 132 | | |
| |||
0 commit comments