Can't create routes with name begin in number
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.6k
- Forks
- 175
- PR merge metrics
- No merged PRs in 30d
Description
When we create a route with a number at the beginning
```
❯ bud new controller 1 index
| 1:9: expected 'IDENT', found 1
```
The controller is not generated but the view is.
```
view/
├── 1
│ └── index.svelte
└── index.svelte
controller/
└── controller.go
```
Result in
```
view: render error conjure: generate "bud/view/_ssr.js". ✘ [ERROR] [plugin tranform_svelte_to_js] Unexpected token (2:9)
1:
2: export let 1s = []
^
3:
4:
svelte:./bud/view/1/index.svelte:2:29:
2 │ import View1IndexSvelte from "./view/1/index.svelte"
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with `bud new controller 1 index`, then inspect the generated `controller/` and `view/1/index.svelte` outputs and the reported Svelte transform error. Done means a controller and view are generated successfully for a route beginning with a number and the generated view builds without the invalid identifier error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, javascript
- Domain
- full-stack
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100