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