livebud / bud

The Full-Stack Web Framework for Go
MIT License
5.53k stars 182 forks source link

Improve bud create logging #362

Open matthewmueller opened 1 year ago

matthewmueller commented 1 year ago
$ bud create testbud
| Created: go.mod
| Created: package.json
| Created: .gitignore
| Created: public/favicon.ico
| Installed: go modules
| Installed: node modules
| Generated: bud
| Ready: testbud
  1. I think we should say Created: testbud/go.mod, etc. because it was unclear where those files were being written.
  2. We should be more explicit about next steps, maybe cd testbud && bud run?

Any sources of inspiration we could draw on here from other libraries and ecosystems?

gofenix commented 1 year ago

I think phoenix framework is good, like this:

mix phx.new myapp
* creating myapp/config/config.exs
* creating myapp/config/dev.exs
* creating myapp/config/prod.exs
* creating myapp/config/runtime.exs
* creating myapp/config/test.exs
* creating myapp/lib/myapp/application.ex
* creating myapp/lib/myapp.ex
* creating myapp/lib/myapp_web/controllers/error_json.ex
* creating myapp/lib/myapp_web/endpoint.ex
* creating myapp/lib/myapp_web/router.ex
* creating myapp/lib/myapp_web/telemetry.ex
* creating myapp/lib/myapp_web.ex
* creating myapp/mix.exs
* creating myapp/README.md
* creating myapp/.formatter.exs
* creating myapp/.gitignore
* creating myapp/test/support/conn_case.ex
* creating myapp/test/test_helper.exs
* creating myapp/test/myapp_web/controllers/error_json_test.exs
* creating myapp/lib/myapp/repo.ex
* creating myapp/priv/repo/migrations/.formatter.exs
* creating myapp/priv/repo/seeds.exs
* creating myapp/test/support/data_case.ex
* creating myapp/lib/myapp_web/controllers/error_html.ex
* creating myapp/test/myapp_web/controllers/error_html_test.exs
* creating myapp/lib/myapp_web/components/core_components.ex
* creating myapp/lib/myapp_web/controllers/page_controller.ex
* creating myapp/lib/myapp_web/controllers/page_html.ex
* creating myapp/lib/myapp_web/controllers/page_html/home.html.heex
* creating myapp/test/myapp_web/controllers/page_controller_test.exs
* creating myapp/lib/myapp_web/components/layouts/root.html.heex
* creating myapp/lib/myapp_web/components/layouts/app.html.heex
* creating myapp/lib/myapp_web/components/layouts.ex
* creating myapp/assets/vendor/topbar.js
* creating myapp/lib/myapp/mailer.ex
* creating myapp/lib/myapp_web/gettext.ex
* creating myapp/priv/gettext/en/LC_MESSAGES/errors.po
* creating myapp/priv/gettext/errors.pot
* creating myapp/assets/css/app.css
* creating myapp/assets/js/app.js
* creating myapp/assets/tailwind.config.js
* creating myapp/priv/static/robots.txt
* creating myapp/priv/static/favicon.ico

Fetch and install dependencies? [Yn] n

We are almost there! The following steps are missing:

    $ cd myapp
    $ mix deps.get

Then configure your database in config/dev.exs and run:

    $ mix ecto.create

Start your Phoenix app with:

    $ mix phx.server

You can also run your app inside IEx (Interactive Elixir) as:

    $ iex -S mix phx.server
image

So I think it's better like this:

  1. Add the folder prefix

    | Created examples/basic/go.mod
  2. Add a color to Created, maybe green

  3. The next steps

We are almost there! The following steps are missing:

    $ cd examples/basic

Start your Bud app with:

    $ bud run
jonatan5524 commented 2 months ago

Hi, I am new to this repo, can I work on this issue?