Skip to content

A Clojure in-repl build tool, for building whatever I need.

License

Notifications You must be signed in to change notification settings

SevereOverfl0w/krei.alpha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Clojure in-repl build tool, for building whatever I need.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published