martenframework / marten

The pragmatic web framework.
https://martenframework.com
MIT License
405 stars 23 forks source link

Add a `marten play` management command #131

Closed ellmetha closed 3 months ago

ellmetha commented 9 months ago

Description

Let's add a new marten play management command that will essentially open the browser and run a Crystal playground initialized with a Crystal snippet ensuring that the current project is required and that Marten is setup properly.

This snippet could probably look something like this:

require "./src/project"

Marten.setup

This will make it easier for Marten developers to play with the current project and test things if necessary.

Ideally, the command should automatically open the browser when executed. That being said, a dedicated option should also be provided in order to make it possible to not automatically open the browser.