/dev

Common bits for dev and test

Primary LanguageClojure

README

tape.dev

About

A Swiss-Army Knife of deps and tools for development and testing Tape Framework modules.

Install

Add it to your :dev or :test alias deps.

deps.edn
{:aliases {:test {:extra-paths ["test" "target"]
                  :extra-deps {tape/dev {:local/root "../dev"}}}}}

Usage

Build

In a a Clojure REPL, start:

  • (build/pig) CLJS REPL with piggieback.

  • (build/fig) Figwheel with a build based on project-level dev.cljs.edn file.

  • (build/big) as above, with piggieback

  • (build/auto m) a build based on configuration discovered automatically; the map m is a an optional map of overrides like {:main 'my.core}.

Note: for piggieback: use a Clojure nREPL with piggieback middleware.

Serve WebJars assets

Serving WebJars assets is useful in DevCards. To do it add the following entry in your config (for figwheel is in the meta part of edn config):

dev.cljs.edn
^{:ring-handler tape.dev.server/handler}
{:main my.core}

The tape.tools.server/app handler uses middleware that serves static resources from "/META-INF/resources/webjars", so assets can be linked as:

hiccup
[:link {:rel "stylesheet" :href "/webjars/bulma/0.8.0/css/bulma.min.css"}]

Deps pulled in

This pulls in re-frame-10x and Bulma WebJar for use in development and DevCards.

License

Copyright © 2019 clyfe

Distributed under the MIT license.