Skip to content

oligot/epm

Repository files navigation

epm

Introduction

epm is an Eiffel Package Manager that is based on npm and bower. epm lets you easily install Eiffel dependencies.

For example, to install a package, run:

epm sync gobo

This will install gobo to ./eiffel_library/gobo. That's it. The idea is that epm does package management and package management only.

Installing epm

For the moment, you have to compile epm on your computer. To compile epm, you will need:

The easiest way to get these dependencies is to run the script bootstrap.sh on Unix and bootstrap.bat on Windows.

Usage

Your best friend at this stage is probably epm --help.

To install or update a package:

epm sync gobo

As you can see, packages can only be installed by name.

Configuration

epm can be configured using JSON in a .epmrc file. directory is the path in which installed components should be saved. If not specified this defaults to eiffel_library.

{
   "directory": "epm_library"
}

Defining a package

You can create a system.json file in your project's root, specifying all of its dependencies. This is similar to Node's package.json, or Ruby's Gemfile, and is useful for locking down a project's dependencies.

{
  "name": "myProject",
  "version": "1.0.0",
  "dependencies": {
    "gobo": "https://github.com/gobo-eiffel/gobo.git"
  }
}

Put this under your project's root, listing all of your dependencies. When you run epm sync, epm will read this system.json file, resolve all the relevant dependencies and install them.

For now, name, version and dependencies are the only properties that are used by epm. For the moment, you can only point to packages by adding their Git URL in the dependency's property. When tags or branches are available in the endpoint, you can specify them like this:

{
  "dependencies": {
    "gobo": "https://github.com/gobo-eiffel/gobo.git#gobo-3.9"
  }
}

Installing dependencies

Dependencies are installed locally via the epm sync command. All package contents are installed in the ./eiffel\_library directory by default.

/eiffel_library/gobo
/eiffel_library/json

You can also install packages one at a time with epm sync json

Windows users

People may experience problems using epm on Windows because msysgit must be installed correctly. Be sure to check the option shown above, otherwise it will simply not work:

msysgit

Authors

License

Copyright 2013- Olivier Ligot

Licensed under the MIT License