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

Improve how to test generated project #325

Open
rosle opened this issue Mar 18, 2022 · 1 comment
Open

Improve how to test generated project #325

rosle opened this issue Mar 18, 2022 · 1 comment

Comments

@rosle
Copy link
Contributor

rosle commented Mar 18, 2022

Why

Sometimes when working on the addon, we need to test the generated app if it works. Usually, we create some basic controller view, add style and javascript to test. 🕵️

To avoid this repetitive step, we can make a patch and keep applying it on the generated project.

  • Create basic controller and view with basic stylesheet and javascript
  • Make a patch file of the diff
  • Commit it to the template, so everyone can reuse it
  • Add instruction into template readme / wiki

Who Benefits?

Developers who work on the template

@malparty
Copy link
Member

I faced the same challenges, but as we are now building the CRUD add-on, the flow might be much easier:

  • scaffold an app with the CRUD addon
  • use the generate command to add model/view/controllers/...
  • and voila!

So I recommend updating this story with

  • Add a create_test_app make command
  • Document how to quickly generate an app (make create_test_app, cd test_app, rails g crud device name:string price:float description:text, make dev, ...) or eventually provide a script that does it all-at-once

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants