Liking cljdoc? Tell your friends :D

oz.core


asset-filetypesclj

source

build!clj

(build! specs & {:as config})

Builds a static web site based on the content specified in specs. Each spec should be a mapping of paths, with additional details about how to build data from one path to the other. Available spec keys are:

  • :from - (required) Path from which to build
  • :to - (required) Compiled files go here
  • :template-fn - Function which takes Oz hiccup content and returns some new hiccup, presumably placing the content in question in some
  • :out-path-fn - Function used for naming compilation output
  • :as-assets? - Pass through as a static assets (for images, css, json or edn data, etc)
    • Note: by default, images, css, etc will pass through anyway

Additional options pertinent to the entire build process may be passed in:

  • :live? - Watch the file files
  • :lazy? - If true, don't build anything until it changes; this is best for interactive/incremental updates and focused work. Set to false if you want to rebuild from scratch. (default true)
  • :view? - Build with live view of most recently changed file (default true)
  • :root-dir - Static assets will be served relative to this directory (defaults to greatest-common-path between all paths)
Builds a static web site based on the content specified in specs. Each spec should be a mapping of paths, with additional
details about how to build data from one path to the other. Available spec keys are:
  * `:from` - (required) Path from which to build
  * `:to` - (required) Compiled files go here
  * `:template-fn` - Function which takes Oz hiccup content and returns some new hiccup, presumably placing the content in question in some 
  * `:out-path-fn` - Function used for naming compilation output
  * `:as-assets?` - Pass through as a static assets (for images, css, json or edn data, etc)
    - Note: by default, images, css, etc will pass through anyway

Additional options pertinent to the entire build process may be passed in:
  * `:live?` - Watch the file files 
  * `:lazy?` - If true, don't build anything until it changes; this is best for interactive/incremental updates and focused work.
               Set to false if you want to rebuild from scratch. (default true)
  * `:view?` - Build with live view of most recently changed file (default true)
  * `:root-dir` - Static assets will be served relative to this directory (defaults to greatest-common-path between all paths)
sourceraw docstring

default-ignore-patternsclj

source

drop-extensionclj

(drop-extension relative-path)
source

export!clj

(export! spec filepath & {:as opts :keys []})

In alpha; Export spec to an html file. May eventually have other options, including svg, jpg & pdf available

In alpha; Export spec to an html file. May eventually have other options, including svg, jpg & pdf available
sourceraw docstring

extensionclj

(extension filename)
source

gist!clj

(gist! spec & {:as opts :keys [name description public] :or {public false}})

Create a gist with the given spec.

Requires authentication, which must be provided by one of the following opts:

  • :auth: a Github auth token the form "username:password"
  • :auth-token: a GitHub OAuth1 / Personal access token as a string (recommended)
  • for oauth2:
    • :client-id: an oauth2 client id property
    • :access-token: oauth2 access token

CAUTION: Note that running these options from the REPL may leave sensitive data in your ./.lein-repl-history file. Thus it's best that you avoid using these options, and instead create a single edn file at ~/.oz/github-creds.edn with these opts. You can run chmod 600 on it, so that only the owner is able to access it. If you want to specify a different path use:

  • :auth-file: defaults to ~/.oz/github-creds.edn.

Additional options:

  • :public: default false
  • :description: auto generated based on spec
Create a gist with the given spec.

Requires authentication, which must be provided by one of the following opts:
* `:auth`: a Github auth token the form "username:password"
* `:auth-token`: a GitHub OAuth1 / Personal access token as a string (recommended)
* for oauth2:
  * `:client-id`: an oauth2 client id property
  * `:access-token`: oauth2 access token

CAUTION: Note that running these options from the REPL may leave sensitive data in your `./.lein-repl-history` file.
Thus it's best that you avoid using these options, and instead create a single edn file at `~/.oz/github-creds.edn` with these opts.
You can run `chmod 600` on it, so that only the owner is able to access it.
If you want to specify a different path use:
* `:auth-file`: defaults to `~/.oz/github-creds.edn`.

Additional options:
* `:public`: default false
* `:description`: auto generated based on spec
sourceraw docstring

htmlclj

(html spec)
(html spec opts)
source

html-extensionclj

(html-extension relative-path)
source

kill-builds!clj

(kill-builds!)

Not to be confused with Kill Bill...

Not to be confused with Kill Bill...
sourceraw docstring

kill-watcher!clj

(kill-watcher! filename)

Kill the corresponding watcher thread.

Kill the corresponding watcher thread.
sourceraw docstring

kill-watchers!clj

(kill-watchers!)
(kill-watchers! filenames)

Kill all watcher threads if no args passed, or just watcher threads for specified filenames if specified.

Kill all watcher threads if no args passed, or just watcher threads for specified filenames if specified.
sourceraw docstring

live-reload!clj

(live-reload! filename)

Watch a clj file for changes, and re-evaluate only those lines which have changed, together with all following lines. Is not sensitive to whitespace changes, and will also always rerun reference forms included in the ns declaration.

Watch a clj file for changes, and re-evaluate only those lines which have changed, together with all following lines.
Is not sensitive to whitespace changes, and will also always rerun reference forms included in the ns declaration.
sourceraw docstring

live-view!clj

(live-view! filename & {:keys [host port format] :as opts})

Watch file for changes and apply load & view! to the contents

Watch file for changes and apply `load` & `view!` to the contents
sourceraw docstring

loadclj

(load filename & {:as opts :keys [format]})

Reads file and processes according to file type

Reads file and processes according to file type
sourceraw docstring

mathjax-scriptclj

source

publish!clj

(publish! spec & {:as opts :keys [mode return-full-gist] :or {mode :vega-lite}})

Publish spec via gist! and print out the corresponding vega-editor or ozviz.io url.

Requires authentication, which must be provided by one of the following opts:

  • :auth: a Github auth token the form "username:password"
  • :oauth-token: a GitHub OAuth1 / Personal access token as a string (recommended)
  • for oauth2:
    • :client-id: an oauth2 client id property
    • :access-token: oauth2 access token

CAUTION: Note that running these options from the REPL may leave sensitive data in your ./.lein-repl-history file. Thus it's best that you avoid using these options, and instead create a single edn file at ~/.oz/github-creds.edn with these opts. You can run chmod 600 on it, so that only the owner is able to access it. If you want to specify a different path use:

  • :auth-file: defaults to ~/.oz/github-creds.edn.

Additional options:

  • :public: default false
  • :description: auto generated based on spec
  • :return-full-gist: return the full tentacles gist api response data
Publish spec via gist! and print out the corresponding vega-editor or ozviz.io url.

Requires authentication, which must be provided by one of the following opts:
* `:auth`: a Github auth token the form "username:password"
* `:oauth-token`: a GitHub OAuth1 / Personal access token as a string (recommended)
* for oauth2:
  * `:client-id`: an oauth2 client id property
  * `:access-token`: oauth2 access token

CAUTION: Note that running these options from the REPL may leave sensitive data in your `./.lein-repl-history` file.
Thus it's best that you avoid using these options, and instead create a single edn file at `~/.oz/github-creds.edn` with these opts.
You can run `chmod 600` on it, so that only the owner is able to access it.
If you want to specify a different path use:
* `:auth-file`: defaults to `~/.oz/github-creds.edn`.

Additional options:
* `:public`: default false
* `:description`: auto generated based on spec
* `:return-full-gist`: return the full tentacles gist api response data
sourceraw docstring

render-vegacljs

(render-vega spec elem)
source

start-server!clj

(start-server!)
(start-server! & [port])

Start the oz plot server (on localhost:10666 by default).

Start the oz plot server (on localhost:10666 by default).
sourceraw docstring

supported-filetypesclj

source

vegacljs

(vega spec)

Reagent component that renders vega

Reagent component that renders vega
sourceraw docstring

vega-litecljs

(vega-lite spec)

Reagent component that renders vega-lite.

Reagent component that renders vega-lite.
sourceraw docstring

view!clj

(view! spec & {:keys [host port mode] :as opts})

View the given spec in a web browser. Specs for which map? is true are treated as single Vega-Lite/Vega specifications. All other values are treated as hiccup, and are therefore expected to be a vector or other iterable. This hiccup may contain Vega-Lite/Vega visualizations embedded like [:vega-lite spec] or [:vega spec]. You may also specify :host and :port, for server settings, and a :mode option, defaulting to :vega-lite, with :vega the alternate option. (Though I will note that Vega-Embed often catches when you pass a vega spec to a vega-lite component, and does the right thing with it. However, this is not guaranteed behavior, so best not to depend on it (wink, nod))

View the given spec in a web browser. Specs for which map? is true are treated as single Vega-Lite/Vega specifications.
All other values are treated as hiccup, and are therefore expected to be a vector or other iterable.
This hiccup may contain Vega-Lite/Vega visualizations embedded like `[:vega-lite spec]` or `[:vega spec]`.
You may also specify `:host` and `:port`, for server settings, and a `:mode` option, defaulting to `:vega-lite`, with `:vega` the alternate option.
(Though I will note that Vega-Embed often catches when you pass a vega spec to a vega-lite component, and does the right thing with it.
However, this is not guaranteed behavior, so best not to depend on it (wink, nod))
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close