Skip to content

Latest commit

 

History

History
79 lines (62 loc) · 1.87 KB

README.adoc

File metadata and controls

79 lines (62 loc) · 1.87 KB

Krei

A build-tool tailored for solving problems I have.

Rationale

Krei is trying to solve the following problems:

  1. Building web-apps using the clj command line tool

  2. Building applications in a mono-repo, where your dependencies have builds too

Usage

Add to deps.edn
io.dominic/krei.alpha {:git/url "https://github.com/SevereOverfl0w/krei.alpha.git"
                       :sha "a18a13e83f81fde9eb437ec08c0426e90f0a8161"}
Ensure target exists before starting the JVM
$ mkdir -p target
$ touch target/.gitkeep
$ git add target/.gitkeep
$ echo "**/target/**
!**/target/.gitkeep" >> .gitignore
src/krei-file.edn
{:krei.sass/files ["platform/magic.scss"] (1)
 :krei.figwheel/builds [{:id "platform-app" (2)
                         :figwheel true
                         :compiler
                         {:main myproject.platform.app
                          :output-to "public/platform.js"
                          :output-dir "public/platform"
                          :asset-path "/public/platform/"}}]}
  1. Identify any scss files you’d like to have built

  2. Identify builds of clojurescript

During development

dev/load-krei.clj
(ns ^{:clojure.tools.namespace.repl/load false}
  load-krei
  (:require
    [io.dominic.krei.alpha.core :as krei]))

(def krei (krei/watch))
dev/user.clj
(ns user
  (:require [load-krei]))

Building for Production

I designed this to be run as part of a makefile or shell script.

$ clj -m io.dominic.krei.alpha.main production "$output-directory"

FAQ

  1. Why not use a component?

    Because components stop & start, and that is not something you generally want every time you (reset) for your cljs & file watcher.

  2. Will you support X?

    Maybe. I’m still figuring out the direction of Krei.