shards icon indicating copy to clipboard operation
shards copied to clipboard

Option to create shard.yml interactively

Open dinkopehar opened this issue 3 years ago • 2 comments

NPM and some other package managers have the ability to generate their versions of shard.yml file based on user provided input. Similar to those package managers, when we execute shards init --interactive, it should ask user for basic input, such as package name, author name etc. The fill in provided data into the shard.yml

Where shard init can generate basic shard.yml file, maybe this option can ask for more details of everything that can go inside shard.yml, such as target, homepage, repository etc

dinkopehar avatar Jan 27 '22 16:01 dinkopehar

Possible alternative/related:

  • Write all available options into the generated shard.yml (atm at least crystal: <version> is missing, possibly others)

  • Unify shards init and crystal init? Might be just me but I often type the former by accident when I actually meant the latter.

Personally I don't see a need for interactive prompting since shard.yml is so easy to write (unlike e.g. package.json in npm).

m-o-e avatar Feb 06 '22 15:02 m-o-e

@m-o-e I agree it's a simple file to write (shard.yml). Maybe in future, if this file contained more information (all package manager files at one point contain lot of info), it would be nice to have it created interactively. On the other hand, I see some of the described keywords in man shards are missing on shard init. This is not important feature at the moment.

dinkopehar avatar Mar 05 '22 07:03 dinkopehar