Giter Site home page Giter Site logo

shards's Introduction

Shards

Dependency manager for the Crystal language.

Usage

Crystal applications and libraries are expected to have a shard.yml file at their root looking like this:

name: shards
version: 0.1.0

dependencies:
  openssl:
    github: datanoise/openssl.cr
    branch: master

development_dependencies:
  minitest:
    git: https://github.com/ysbaddaden/minitest.cr.git
    version: ~> 0.3.1

license: MIT

When libraries are installed from Git repositories, the repository is expected to have version tags following the semver format, prefixed with a v. Examples: v1.2.3 or v2.0.0-rc1.

Please see the SPEC for more details about the shard.yml format.

Install

Shards is now distributed with Crystal itself (at least in the Homebrew and Debian/Ubuntu packages). You can invoke it with crystal deps.

You may download a statically compiled 64bit executable of Shards for Linux or OS X from the releases page and install it somewhere into your PATH, this version will take precedence over the bundled version.

Alternatively you may download a source tarball from the same page (or clone the repository) then run make —or make release for an optimized build— and copy the newly generated bin/shards somewhere into your PATH. A good place is /usr/local/bin for example.

You are now ready to create a shard.yml for your projects (see the SPEC).

Simply run shards install to install your dependencies, which will lock your dependencies into shard.lock, which you should check into version control, because install will always install the locked versions, for reproducible intallations across computers.

Last but not least, use shards --help to list the other commands and their options.

Happy Hacking!

Requirements

These requirements are only for compiling Shards.

  • Crystal

    Please refer to http://crystal-lang.org/docs/installation for instructions for your operating system.

  • libyaml

    On Debian/Ubuntu Linux you may install the libyaml-dev package.

    On Mac OS X you may install it using homebrew with brew install libyaml then make sure to have /usr/local/lib in your LIBRARY_PATH environment variable (eg: export LIBRARY_PATH="/usr/local/lib:$LIBRARY_PATH"). Please adjust the path per your Homebrew installation.

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.

shards's People

Contributors

asterite avatar barisbalic avatar jbye avatar jessedoyle avatar jhass avatar joshbuker avatar luislavena avatar samueleaton avatar songjiayang avatar soveran avatar splattael avatar sstarr avatar thelonelyghost avatar ysbaddaden avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.