Start off by creating a file called Cask
in the project root. Use
the init
command to create a Cask
-file automatically, containing
boilerplate code.
$ cask init [--dev]
(Use --dev
if the project is for package development)
If you are using Cask for your Emacs configuration, add this to your
.emacs
file:
(require 'cask "~/.cask/cask.el")
(cask-initialize)
To install all dependencies, run:
$ cask [install]
This will create a directory called .cask
, containing all dependencies.
The commands below execute using the emacs
binary. To specify a
custom Emacs, use the EMACS
environment variable, for example:
$ EMACS="$(evm bin emacs-24.1)" cask command
Cask's commands and options are briefly described below. For full
documentation, use cask help
.
Execute command with correct PATH
(see path) and
EMACSLOADPATH
(see load-path) set up.
$ cask exec echo foo
$ cask exec ecukes --script --reporter gangsta
$ cask exec ert-runner --pattern performance
Show Cask usage information.
$ cask help
$ cask -h
$ cask --help
$ cask --help command
Show information about the project, such as name, description and version.
$ cask info
Create new Cask
-file. If the project is for package development, use
the --dev
option.
$ cask init # For Emacs configuration
$ cask init --dev # For package development
This is the default command, which installs all runtime and
development dependencies specified in the Cask
-file.
$ cask
$ cask install
List all runtime and development dependencies.
$ cask list
Print EMACSLOADPATH
-friendly string with path to all dependencies to
this project.
The exec command includes the output of this command
automatically. This means that if the command executed is an Emacs
process, there's no hassle with the load-path
, just require the
dependencies.
$ cask load-path
Show list of all outdated dependencies. That is dependencies that have a more recent version available for installation.
$ cask outdated
Create a -pkg.el
file (see
http://www.gnu.org/software/emacs/manual/html_node/elisp/Multi_002dfile-Packages.html#Multi_002dfile-Packages).
$ cask package
Print path to package directory, that is the path to the directory
where all dependencies are installed (.cask/EMACS-VERSION/elpa
).
$ cask package-directory
Print PATH
and prepend path to all directories called bin
in this
projects dependencies.
For example if this project depends on ecukes
, this command will
include .cask/EMACS-VERSION/elpa/ecukes-VERSION/bin
.
$ cask path
Update all dependencies.
$ cask update
Upgrade Cask and all its dependencies.
$ cask upgrade-cask
Print version of this package.
$ cask version
Print list of package files.
$ cask files
Byte compile all package files. The .elc
files are placed in the
same directory as the source file.
$ cask build
Remove byte compiled files generated from the build
command.
$ cask clean-elc
Handle package links.
$ cask link list # List all links
$ cask link ecukes ~/Code/ecukes # Create link to local Ecukes
$ cask link delete ecukes # Delete Ecukes link
Build a package (.el
or .tar
) and place in the dist
(or
specified) directory.
$ cask package
$ cask package /path/to/dist
Set Emacs proxy for HTTP and HTTPS.
$ cask --proxy "localhost:8888"
Set Emacs proxy for HTTP.
$ cask --http-proxy "localhost:8888"
Set Emacs proxy for HTTPS.
$ cask --https-proxy "localhost:8888"
Set Emacs "no-proxy".
$ cask --no-proxy "work\\.com"
Print Cask's version.
$ cask --version
Perform action in development mode. This option does only take affect for some commands. See resp. command for that information.
$ cask --dev
Enable debug information.
$ cask --debug
Change default directory to path before executing command.
$ cask --path /path/to
Cask tries to hide as much output as possible by default. With this option, all output will show.
$ cask install --verbose