Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 Bug fix - add layout can create modules that don't compile. #51

Merged
merged 1 commit into from Oct 23, 2022

Conversation

MattCheely
Copy link
Contributor

Problem

When creating a layout, it is possible to request an invalid module name and end up with a module that won't compile. For example:

elm-land add layout:static lowercase

will create a module called layout.elm which cannot compile because modules must begin with an uppercase letter

Solution

This adds checks to the add command that automatically upper-cases a lowercase initial letter, and rejects other invalid names with a friendly error message.

@netlify
Copy link

netlify bot commented Oct 19, 2022

Deploy Preview for elm-land canceled.

Name Link
🔨 Latest commit 41466eb
🔍 Latest deploy log https://app.netlify.com/sites/elm-land/deploys/634f4b0f2a4fe4000908d9c5

@ryan-haskell
Copy link
Contributor

This PR looks great @MattCheely, merging it in now!

@ryan-haskell ryan-haskell merged commit 83dfa10 into elm-land:main Oct 23, 2022
@MattCheely MattCheely deleted the layout-name-validation branch February 27, 2023 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants