-
Notifications
You must be signed in to change notification settings - Fork 207
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
[CLI] Adds support for generating pages #674
[CLI] Adds support for generating pages #674
Conversation
@davidpatters0n Thank you for this nice contribution! Can we add a Right now is just Currently with this PR: # 1. Generate src/views/about_view.slang
amber g view About
# 2. Create src/controllers/about_controllers.slang
amber g controller About
# 3. Edit controller to render about view
nano src/controllers/about_controllers.slang
# 4. Edit config/router.cr to point /about path to AboutController :index
nano config/router.cr With proposed # Generate new view, controller and update the new path to router file
amber g page About Lucky framework can do something similar using @amberframework/contributors WDYT? |
BTW, I think we can change CLI.logger.error "Template not found", "Generate", :light_red less verbose, more clean |
@faustinoaq - Sure I'll make this amendment later on today. 👍 thanks for the feedback |
@faustinoaq Lucky follows a different naming conventions. I am fine not adding a Page generator also that seems that can be addressed in a separate PR. |
@faustinoaq A new page should be added with
|
* Revert "[Generator] Remove raise from Template (#686)" This reverts commit a87e585. * Revert "Use Inflector to pluralize model names (#673)" This reverts commit 10aa165. * Revert "[Settings] Logger Builder (#684)" This reverts commit e216eb8. * Revert "[CLI] Adds support for generating pages (#674)" This reverts commit a9449de.
Description of the Change
Address: #671
Alternate Designs
None
Benefits
Allows developers to run
amber g page About
Possible Drawbacks
None