Skip to content

Latest commit

 

History

History
168 lines (131 loc) · 8.32 KB

cask_language_deltas.md

File metadata and controls

168 lines (131 loc) · 8.32 KB

Cask Language Deltas

This document summarizes revisions to the Cask Domain-Specific Language (DSL).

This Document Is Incomplete

This document is still being written. It is not yet a complete reference. This notice will be removed for the final form.

Cask DSL 1.0

These are deltas from the pre-existing (unversioned) conventions to the Cask DSL 1.0 specification.

Header Line (1.0)

The header line was changed from the form

class MyApp < Cask

to

cask :v1 => 'my-app' do

Legacy rules for mapping Cask filenames to header class names are no longer needed. The name 'my-app' in the header corresponds directly to the filename my-app.rb.

The term :v1 identifies the DSL version (currently 1.0), and defines the features which are available for the current Cask.

New Forms (1.0)

Renamed Forms (1.0)

old form new form
after_install postflight
after_uninstall uninstall_postflight
before_install preflight
before_uninstall uninstall_preflight
container_type container :type
depends_on_formula depends_on :formula
destination_path staged_path
install pkg
link app (or sometimes suite or artifact)
manual_installer(path) (within caveats) installer :manual
nested_container container :nested =>
uninstall :files uninstall :delete
version 'latest' version :latest

All Supported Stanzas (1.0)

Other Supported Non-stanza Methods (1.0)

For use in eg interpolation:

Caveats Mini-DSL (1.0)

References

<3 THANK YOU TO ALL CONTRIBUTORS! <3