A CLI app built on Crystal that makes managing shards easier.
No more writing to shards.yml by hand. In just a command, Sharn will handle everything for you.
This is also my own version of the solution for crystal-lang/shards#144 that is currently been discussed at the crystal-lang/shards repo.
Note: This is not a replacement for Shards. It will still be used in installing your dependencies.
- Clone this repo.
- Build it by running
build.sh - Run it.
- Add dependency/dependencies.
sharn add git/reponame1.1 (new) Add development dependencies with dev-add
sharn dev-add git/reponame- Remove dependency/dependencies
sharn rm depname1 depname2- Specify version.
sharn add git/[email protected]- Specify git platform
sharn add [gitlab/github/bitbucket]:git/repoTip: By default, when none is specified, Sharn will automatically identifies it as a GitHub repo.
- Specify branch.
sharn add git/repo#master- Primary commands (add, remove, inspect, install)
-
addcommand -
removecommand -
inspectcommand -
installcommand -
updatecommand
-
-
dev-addcommand (new!) - execute
shards installin post-installation - YAML manipulation
-
Installing dev dependencies with(Replaced with--devflag(*)dev-addcommand) - Specify git plaform
- Specify branch (with
--branchoption) - Specify version
- Just version number
-
~>,=>,<=,>,<
-
- You may have noticed that your
shard.ymlfile has been changed with newlines/whitespaces removed. This is because the way YAML module in Crystal builds the markup but don't worry this is still valid YAML and it has no difference when installing dependencies compared with newlines/whitespaces.
2. Dependencies added using the (Solved in https://github.com/nedpals/sharn/commit/644280a50a69880c0a329454b2cf884979581a5b)--dev flag are now working but not added in the correct order as per shard.yml specification.
- Fork it ( https://github.com/nedpals/sharn/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
- nedpals Ned Palacios - creator, maintainer