The rock Reference Manual

This is the rock Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:36:49 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 rock

Asset manager for Common Lisp.

Maintainer

Fernando Borretti <>

Author

Fernando Borretti <>

Home Page

http://eudoxia.me/rock/

Source Control

(GIT git@github.com:eudoxia0/rock.git)

Bug Tracker

https://github.com/eudoxia0/rock/issues

License

MIT

Long Description

# Rock: Assets for Common Lisp web apps

[![Build Status](https://travis-ci.org/eudoxia0/rock.svg?branch=master)](https://travis-ci.org/eudoxia0/rock)

Rock is an asset manager for Common Lisp. It’s basically a combination of
[Bower][bower] and [webassets][webassets].

Rock takes care of downloading specific versions of libraries – jQuery,
Bootstrap, FontAwesome – and bundling their files together so you can compile
all your JavaScript and CSS into single files.

[bower]: http://bower.io/
[webassets]: http://webassets.readthedocs.org/en/latest/index.html

# Features

* **Library Manager**: Download specific versions of the most common
libraries. You can have multiple versions of the same library, for example,
for migrating an application one subset at a time.
* **Asset Bundling**: Compile the JS/CSS files of different libraries and your
own files into a single file. You can produce many bundles per application,
for example, a bundle with an old version of different libraries, and a bundle
with newer versions, for migrating a large application one subset at a time.

# License

Copyright (c) 2014-2015 Fernando Borretti (eudoxiahp@gmail.com)

Licensed under the MIT License.

Version

0.1

Dependencies
  • trivial-download (system).
  • trivial-extract (system).
  • trivial-types (system).
  • asdf (system).
  • anaphora (system).
Source

rock.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 rock/src

Source

rock.asd.

Parent Component

rock (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 rock/rock.asd

Source

rock.asd.

Parent Component

rock (system).

ASDF Systems

rock.

Packages

rock-asd.


4.1.2 rock/src/package.lisp

Source

rock.asd.

Parent Component

src (module).

Packages

rock.


4.1.3 rock/src/files.lisp

Source

rock.asd.

Parent Component

src (module).

Internals

4.1.4 rock/src/assets.lisp

Source

rock.asd.

Parent Component

src (module).

Internals

4.1.5 rock/src/known-assets.lisp

Source

rock.asd.

Parent Component

src (module).


4.1.6 rock/src/environments.lisp

Source

rock.asd.

Parent Component

src (module).

Internals

4.1.7 rock/src/interface.lisp

Source

rock.asd.

Parent Component

src (module).

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 rock

Source

package.lisp.

Use List
  • anaphora.
  • common-lisp.
  • trivial-types.
Public Interface
Internals

5.2 rock-asd

Source

rock.asd.

Use List
  • asdf/interface.
  • common-lisp.

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Macros

Macro: defenv (system-name &key assets bundles assets-directory)

Define an environment.

Package

rock.

Source

interface.lisp.


6.1.2 Ordinary functions

Function: build (system-name)

Build the environment associated with ‘system-name‘.

Package

rock.

Source

interface.lisp.


6.2 Internals


6.2.1 Special variables

Special Variable: *assets*
Package

rock.

Source

assets.lisp.

Special Variable: *environments*
Package

rock.

Source

environments.lisp.


6.2.2 Macros

Macro: defasset (name class &rest params)
Package

rock.

Source

assets.lisp.

Macro: make-asset (asset-name version)
Package

rock.

Source

interface.lisp.

Macro: make-bundle (kind &key assets files destination)
Package

rock.

Source

interface.lisp.


6.2.3 Ordinary functions

Function: concatenate-files (files target &optional joiner)

Concatenate the files in ‘files‘ (A list of pathnames) into ‘target‘. Ensure the parent directories of ‘target‘ exist.

Package

rock.

Source

files.lisp.

Function: download (url destination)
Package

rock.

Source

files.lisp.

Function: find-asset (name)
Package

rock.

Source

assets.lisp.

Function: get-env (system-name)
Package

rock.

Source

environments.lisp.

Function: version-string (version)
Package

rock.

Source

assets.lisp.


6.2.4 Generic functions

Generic Reader: asset (object)
Package

rock.

Methods
Reader Method: asset ((<asset-version> <asset-version>))

automatically generated reader method

Source

assets.lisp.

Target Slot

asset.

Generic Function: asset-directory (asset-v env)
Package

rock.

Methods
Method: asset-directory ((asset-v <asset-version>) (env <environment>))

The directory of an asset version within an environment.

Source

environments.lisp.

Generic Function: asset-directory-name (asset-v)
Package

rock.

Methods
Method: asset-directory-name ((asset-v <asset-version>))
Source

environments.lisp.

Generic Function: asset-local-pathname (asset-v env file)
Package

rock.

Methods
Method: asset-local-pathname ((asset-v <asset-version>) (env <environment>) (file string))

The local pathname of an asset version’s file in an environment.

Source

environments.lisp.

Generic Reader: assets (object)
Package

rock.

Methods
Reader Method: assets ((<bundle> <bundle>))

The assets from the environment that will be bundled.

Source

environments.lisp.

Target Slot

assets.

Generic Reader: assets-directory (object)
Package

rock.

Methods
Reader Method: assets-directory ((<environment> <environment>))

automatically generated reader method

Source

environments.lisp.

Target Slot

assets-directory.

Generic Reader: base-url (object)
Package

rock.

Methods
Reader Method: base-url ((<web-asset> <web-asset>))

The base URL for the files in the file slot.

Source

assets.lisp.

Target Slot

base-url.

Generic Function: build-bundle (bundle env)
Package

rock.

Methods
Method: build-bundle ((bundle <bundle>) (env <environment>))
Source

environments.lisp.

Generic Function: build-env (env)
Package

rock.

Methods
Method: build-env ((env <environment>))

Build an environment: Download all dependencies and build all its bundles.

Source

environments.lisp.

Generic Reader: bundles (object)
Package

rock.

Methods
Reader Method: bundles ((<environment> <environment>))

automatically generated reader method

Source

environments.lisp.

Target Slot

bundles.

Generic Reader: css (object)
Package

rock.

Methods
Reader Method: css ((<common-asset> <common-asset>))

A list of CSS files.

Source

assets.lisp.

Target Slot

css.

Generic Reader: dependencies (object)
Package

rock.

Methods
Reader Method: dependencies ((<environment> <environment>))

automatically generated reader method

Source

environments.lisp.

Target Slot

dependencies.

Generic Reader: destination (object)
Package

rock.

Methods
Reader Method: destination ((<bundle> <bundle>))

The pathname of the compiled bundle.

Source

environments.lisp.

Target Slot

destination.

Generic Function: download-asset (asset-v env)
Package

rock.

Methods
Method: download-asset ((asset-v <asset-version>) (env <environment>))

Download all the files in an asset.

Source

environments.lisp.

Generic Function: download-file-list (asset-v env files)
Package

rock.

Methods
Method: download-file-list ((asset-v <asset-version>) (env <environment>) files)
Source

environments.lisp.

Generic Function: env-build-directory (env)
Package

rock.

Methods
Method: env-build-directory ((env <environment>))
Source

environments.lisp.

Generic Function: env-relative-pathname (env path)
Package

rock.

Methods
Method: env-relative-pathname ((env <environment>) (path pathname))

A pathname relative to an environment’s assets directory.

Source

environments.lisp.

Generic Function: file-url (asset-v filepath)
Package

rock.

Methods
Method: file-url ((asset-v <asset-version>) filepath)

The URL to a ‘filepath‘ in an asset version ‘asset-v‘.

Source

assets.lisp.

Generic Reader: files (object)
Package

rock.

Methods
Reader Method: files ((<bundle> <bundle>))

automatically generated reader method

Source

environments.lisp.

Target Slot

files.

Reader Method: files ((<web-asset> <web-asset>))

A list of general assets.

Source

assets.lisp.

Target Slot

files.

Reader Method: files ((<common-asset> <common-asset>))

A list of general assets.

Source

assets.lisp.

Target Slot

files.

Generic Function: format-string (asset)

The format string for a asset’s URL with the library name, but without the version and filepath.

Package

rock.

Source

assets.lisp.

Methods
Method: format-string ((asset <github-asset>))
Method: format-string ((asset <cdnjs-asset>))
Method: format-string ((asset <bootstrap-cdn-asset>))
Method: format-string ((asset <google-asset>))
Generic Function: full-assets-directory (env)
Package

rock.

Methods
Method: full-assets-directory ((env <environment>))

The absolute path to an environment’s assets directory.

Source

environments.lisp.

Generic Reader: js (object)
Package

rock.

Methods
Reader Method: js ((<common-asset> <common-asset>))

A list of JavaScript files.

Source

assets.lisp.

Target Slot

js.

Generic Reader: kind (object)
Package

rock.

Methods
Reader Method: kind ((<bundle> <bundle>))

A ‘:js‘ bundle or a ‘:css‘ bundle.

Source

environments.lisp.

Target Slot

kind.

Generic Reader: name (object)
Package

rock.

Methods
Reader Method: name ((<common-asset> <common-asset>))

The name of the asset as a string.

Source

assets.lisp.

Target Slot

name.

Generic Reader: system-name (object)
Package

rock.

Methods
Reader Method: system-name ((<environment> <environment>))

automatically generated reader method

Source

environments.lisp.

Target Slot

system-name.

Generic Reader: username (object)
Package

rock.

Methods
Reader Method: username ((<github-asset> <github-asset>))

automatically generated reader method

Source

assets.lisp.

Target Slot

username.

Generic Reader: version (object)
Package

rock.

Methods
Reader Method: version ((<asset-version> <asset-version>))

automatically generated reader method

Source

assets.lisp.

Target Slot

version.

Generic Function: version-commit (asset version)
Package

rock.

Methods
Method: version-commit ((asset <github-asset>) version)
Source

assets.lisp.

Generic Reader: versions (object)
Package

rock.

Methods
Reader Method: versions ((<common-asset> <common-asset>))

A list of versions (Each a keyword like ‘:1.2.3‘).

Source

assets.lisp.

Target Slot

versions.


6.2.5 Classes

Class: <asset-version>

A particular version of an asset.

Package

rock.

Source

assets.lisp.

Direct methods
Direct slots
Slot: asset
Type

rock::<asset>

Initargs

:asset

Readers

asset.

Writers

This slot is read-only.

Slot: version
Type

keyword

Initargs

:version

Readers

version.

Writers

This slot is read-only.

Class: <asset>

The base class of all assets.

Package

rock.

Source

assets.lisp.

Direct subclasses
Class: <bootstrap-cdn-asset>
Package

rock.

Source

assets.lisp.

Direct superclasses

<common-asset>.

Direct methods

format-string.

Class: <bundle>

A bundle is a collection of assets and static files. Those
files, and the files corresponding to the bundle’s kind in each asset, will be concatenated together into the destination pathname.

Package

rock.

Source

environments.lisp.

Direct methods
Direct slots
Slot: kind

A ‘:js‘ bundle or a ‘:css‘ bundle.

Type

keyword

Initargs

:kind

Readers

kind.

Writers

This slot is read-only.

Slot: assets

The assets from the environment that will be bundled.

Type

(trivial-types:proper-list rock::<asset-version>)

Initargs

:assets

Readers

assets.

Writers

This slot is read-only.

Slot: files
Type

(trivial-types:proper-list pathname)

Initargs

:files

Readers

files.

Writers

This slot is read-only.

Slot: destination

The pathname of the compiled bundle.

Type

pathname

Initargs

:destination

Readers

destination.

Writers

This slot is read-only.

Class: <cdnjs-asset>
Package

rock.

Source

assets.lisp.

Direct superclasses

<common-asset>.

Direct methods

format-string.

Class: <common-asset>

The most common kind of asset: A collection of files with multiple versions.

Package

rock.

Source

assets.lisp.

Direct superclasses

<asset>.

Direct subclasses
Direct methods
Direct slots
Slot: name

The name of the asset as a string.

Type

string

Initargs

:name

Readers

name.

Writers

This slot is read-only.

Slot: js

A list of JavaScript files.

Type

(trivial-types:proper-list string)

Initargs

:js

Readers

js.

Writers

This slot is read-only.

Slot: css

A list of CSS files.

Type

(trivial-types:proper-list string)

Initargs

:css

Readers

css.

Writers

This slot is read-only.

Slot: files

A list of general assets.

Type

(trivial-types:proper-list string)

Initargs

:files

Readers

files.

Writers

This slot is read-only.

Slot: versions

A list of versions (Each a keyword like ‘:1.2.3‘).

Type

list

Initargs

:versions

Readers

versions.

Writers

This slot is read-only.

Class: <environment>
Package

rock.

Source

environments.lisp.

Direct methods
Direct slots
Slot: system-name
Type

keyword

Initargs

:system-name

Readers

system-name.

Writers

This slot is read-only.

Slot: assets-directory
Type

pathname

Initform

#p"assets/"

Initargs

:assets-directory

Readers

assets-directory.

Writers

This slot is read-only.

Slot: dependencies
Type

(trivial-types:proper-list rock::<asset-version>)

Initargs

:dependencies

Readers

dependencies.

Writers

This slot is read-only.

Slot: bundles
Type

(trivial-types:proper-list rock::<bundle>)

Initargs

:bundles

Readers

bundles.

Writers

This slot is read-only.

Class: <github-asset>
Package

rock.

Source

assets.lisp.

Direct superclasses

<common-asset>.

Direct methods
Direct slots
Slot: username
Type

string

Initargs

:username

Readers

username.

Writers

This slot is read-only.

Class: <google-asset>
Package

rock.

Source

assets.lisp.

Direct superclasses

<common-asset>.

Direct methods

format-string.

Class: <web-asset>

A collection of files to download from some base URL. Useful for downloading images, etc.

Package

rock.

Source

assets.lisp.

Direct superclasses

<asset>.

Direct methods
Direct slots
Slot: base-url

The base URL for the files in the file slot.

Type

string

Initargs

:base-url

Readers

base-url.

Writers

This slot is read-only.

Slot: files

A list of general assets.

Type

(trivial-types:proper-list string)

Initargs

:files

Readers

files.

Writers

This slot is read-only.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   A   B   C   D   E   F   G   J   K   M   N   S   U   V  
Index Entry  Section

A
asset: Private generic functions
asset: Private generic functions
asset-directory: Private generic functions
asset-directory: Private generic functions
asset-directory-name: Private generic functions
asset-directory-name: Private generic functions
asset-local-pathname: Private generic functions
asset-local-pathname: Private generic functions
assets: Private generic functions
assets: Private generic functions
assets-directory: Private generic functions
assets-directory: Private generic functions

B
base-url: Private generic functions
base-url: Private generic functions
build: Public ordinary functions
build-bundle: Private generic functions
build-bundle: Private generic functions
build-env: Private generic functions
build-env: Private generic functions
bundles: Private generic functions
bundles: Private generic functions

C
concatenate-files: Private ordinary functions
css: Private generic functions
css: Private generic functions

D
defasset: Private macros
defenv: Public macros
dependencies: Private generic functions
dependencies: Private generic functions
destination: Private generic functions
destination: Private generic functions
download: Private ordinary functions
download-asset: Private generic functions
download-asset: Private generic functions
download-file-list: Private generic functions
download-file-list: Private generic functions

E
env-build-directory: Private generic functions
env-build-directory: Private generic functions
env-relative-pathname: Private generic functions
env-relative-pathname: Private generic functions

F
file-url: Private generic functions
file-url: Private generic functions
files: Private generic functions
files: Private generic functions
files: Private generic functions
files: Private generic functions
find-asset: Private ordinary functions
format-string: Private generic functions
format-string: Private generic functions
format-string: Private generic functions
format-string: Private generic functions
format-string: Private generic functions
full-assets-directory: Private generic functions
full-assets-directory: Private generic functions
Function, build: Public ordinary functions
Function, concatenate-files: Private ordinary functions
Function, download: Private ordinary functions
Function, find-asset: Private ordinary functions
Function, get-env: Private ordinary functions
Function, version-string: Private ordinary functions

G
Generic Function, asset: Private generic functions
Generic Function, asset-directory: Private generic functions
Generic Function, asset-directory-name: Private generic functions
Generic Function, asset-local-pathname: Private generic functions
Generic Function, assets: Private generic functions
Generic Function, assets-directory: Private generic functions
Generic Function, base-url: Private generic functions
Generic Function, build-bundle: Private generic functions
Generic Function, build-env: Private generic functions
Generic Function, bundles: Private generic functions
Generic Function, css: Private generic functions
Generic Function, dependencies: Private generic functions
Generic Function, destination: Private generic functions
Generic Function, download-asset: Private generic functions
Generic Function, download-file-list: Private generic functions
Generic Function, env-build-directory: Private generic functions
Generic Function, env-relative-pathname: Private generic functions
Generic Function, file-url: Private generic functions
Generic Function, files: Private generic functions
Generic Function, format-string: Private generic functions
Generic Function, full-assets-directory: Private generic functions
Generic Function, js: Private generic functions
Generic Function, kind: Private generic functions
Generic Function, name: Private generic functions
Generic Function, system-name: Private generic functions
Generic Function, username: Private generic functions
Generic Function, version: Private generic functions
Generic Function, version-commit: Private generic functions
Generic Function, versions: Private generic functions
get-env: Private ordinary functions

J
js: Private generic functions
js: Private generic functions

K
kind: Private generic functions
kind: Private generic functions

M
Macro, defasset: Private macros
Macro, defenv: Public macros
Macro, make-asset: Private macros
Macro, make-bundle: Private macros
make-asset: Private macros
make-bundle: Private macros
Method, asset: Private generic functions
Method, asset-directory: Private generic functions
Method, asset-directory-name: Private generic functions
Method, asset-local-pathname: Private generic functions
Method, assets: Private generic functions
Method, assets-directory: Private generic functions
Method, base-url: Private generic functions
Method, build-bundle: Private generic functions
Method, build-env: Private generic functions
Method, bundles: Private generic functions
Method, css: Private generic functions
Method, dependencies: Private generic functions
Method, destination: Private generic functions
Method, download-asset: Private generic functions
Method, download-file-list: Private generic functions
Method, env-build-directory: Private generic functions
Method, env-relative-pathname: Private generic functions
Method, file-url: Private generic functions
Method, files: Private generic functions
Method, files: Private generic functions
Method, files: Private generic functions
Method, format-string: Private generic functions
Method, format-string: Private generic functions
Method, format-string: Private generic functions
Method, format-string: Private generic functions
Method, full-assets-directory: Private generic functions
Method, js: Private generic functions
Method, kind: Private generic functions
Method, name: Private generic functions
Method, system-name: Private generic functions
Method, username: Private generic functions
Method, version: Private generic functions
Method, version-commit: Private generic functions
Method, versions: Private generic functions

N
name: Private generic functions
name: Private generic functions

S
system-name: Private generic functions
system-name: Private generic functions

U
username: Private generic functions
username: Private generic functions

V
version: Private generic functions
version: Private generic functions
version-commit: Private generic functions
version-commit: Private generic functions
version-string: Private ordinary functions
versions: Private generic functions
versions: Private generic functions


A.3 Variables


A.4 Data types

Jump to:   <  
A   C   E   F   I   K   M   P   R   S  
Index Entry  Section

<
<asset-version>: Private classes
<asset>: Private classes
<bootstrap-cdn-asset>: Private classes
<bundle>: Private classes
<cdnjs-asset>: Private classes
<common-asset>: Private classes
<environment>: Private classes
<github-asset>: Private classes
<google-asset>: Private classes
<web-asset>: Private classes

A
assets.lisp: The rock/src/assets․lisp file

C
Class, <asset-version>: Private classes
Class, <asset>: Private classes
Class, <bootstrap-cdn-asset>: Private classes
Class, <bundle>: Private classes
Class, <cdnjs-asset>: Private classes
Class, <common-asset>: Private classes
Class, <environment>: Private classes
Class, <github-asset>: Private classes
Class, <google-asset>: Private classes
Class, <web-asset>: Private classes

E
environments.lisp: The rock/src/environments․lisp file

F
File, assets.lisp: The rock/src/assets․lisp file
File, environments.lisp: The rock/src/environments․lisp file
File, files.lisp: The rock/src/files․lisp file
File, interface.lisp: The rock/src/interface․lisp file
File, known-assets.lisp: The rock/src/known-assets․lisp file
File, package.lisp: The rock/src/package․lisp file
File, rock.asd: The rock/rock․asd file
files.lisp: The rock/src/files․lisp file

I
interface.lisp: The rock/src/interface․lisp file

K
known-assets.lisp: The rock/src/known-assets․lisp file

M
Module, src: The rock/src module

P
Package, rock: The rock package
Package, rock-asd: The rock-asd package
package.lisp: The rock/src/package․lisp file

R
rock: The rock system
rock: The rock package
rock-asd: The rock-asd package
rock.asd: The rock/rock․asd file

S
src: The rock/src module
System, rock: The rock system