ponylang / pony-stable

:horse: A simple dependency manager for the Pony language.
BSD 2-Clause "Simplified" License
134 stars 18 forks source link

Make getting started friendly #49

Open tbillington opened 7 years ago

tbillington commented 7 years ago

Currently neither the readme nor pony-stable provide/explain a way to initialise a project.

I had to look at other repos and projects in pony to find how to structure the bundle.json. It's not explained in the readme how to get started.

A common solution is to add an init command to pony-stable to initialise the config file as seen in other package managers.

SeanTAllen commented 7 years ago

Running, stable add will create the required bundle.json. What would an init command do?

tbillington commented 7 years ago

Create a base bundle.json with no deps presumably.

I was confused by the content of the help command. It says to Invoke in a working directory containing a bundle.json but none of the commands mention the ability to create bundle.json. Perhaps the add command could mention that it will create the bundle.json if needed?

> stable help
Usage: stable COMMAND [...]

    A simple dependency manager for the Pony language.

    Invoke in a working directory containing a bundle.json.

Commands:
    help    - Print this message
    version - Print version information
    fetch   - Fetch/update the deps for this bundle
    env     - Execute the following shell command inside an environment
              with PONYPATH set to include deps directories. For example,
              `stable env ponyc myproject`
    add     - Add a new dependency. For exemple,
              `stable add github jemc/pony-inspect
SeanTAllen commented 7 years ago

Can you open a PR for this?

tbillington commented 7 years ago

@SeanTAllen sure, how would you recommend changing it, something like:

Invoke in a working directory containing a bundle.json.

->

Invoke in a working directory containing a bundle.json.
Alternatively, adding a dependency will create a
bundle.json containing the dependency in the directory.
Akiyamka commented 4 years ago

I would also love to see the initialization command. it would be cool to set the package version and name In bundle.json on init step (with user prompt)