Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multimethods #4

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
404dffb
Replace read-krei-files with individual read-krei-filen
malcolmsparks Aug 2, 2018
457a9ae
Factor out Figwheel and Sass via multimethods
malcolmsparks Aug 2, 2018
9925c40
Avoid re-parsing krei-files in `build-sass`
malcolmsparks Aug 2, 2018
2cede7c
Pass build config to watch
malcolmsparks Aug 3, 2018
d02e770
Disable shadow-cljs due to conflict with Figwheel
malcolmsparks Aug 4, 2018
3217cb6
Update README and LICENSE
malcolmsparks Aug 4, 2018
79de8fc
Fix typo
malcolmsparks Aug 4, 2018
719d072
Move package structure to align with renaming
malcolmsparks Aug 4, 2018
57e2785
Rename alias and delete redundant comment
malcolmsparks Aug 4, 2018
ea73151
Fix debounce to ignore Emacs temp files
malcolmsparks Aug 5, 2018
881c566
Reload on adoc file change (in addition to html file change)
malcolmsparks Aug 5, 2018
c1f1e94
Fix docstring
malcolmsparks Aug 26, 2018
a24c123
Build sass on init
malcolmsparks Aug 29, 2018
e8f0e15
Respect user setting of cljs optimizations
malcolmsparks Aug 29, 2018
71d83fc
Prevent error from failing agent
malcolmsparks Aug 29, 2018
c20ece5
Parameterize server-port
malcolmsparks Sep 16, 2018
158695f
Add pom.xml
malcolmsparks Sep 16, 2018
acc236a
Update to multiple Sass builds
malcolmsparks Sep 17, 2018
e8665b9
Warn if Sass file not found
malcolmsparks Sep 18, 2018
ceb919e
Add figwheel alias
SevereOverfl0w Sep 21, 2018
879f138
Update README to use one sentence per-line
SevereOverfl0w Sep 21, 2018
61c709b
Remove invalid cljs.build.api reference
SevereOverfl0w Sep 21, 2018
f8f47b6
Add build-once support
SevereOverfl0w Sep 21, 2018
26f6473
Reformatting and logging
malcolmsparks Oct 3, 2018
1defb0d
Replace `:sources` with `:source` and `:target`
malcolmsparks Oct 3, 2018
cfe90ba
Merge new oneshot! code with new build-sass semantic
malcolmsparks Oct 3, 2018
eb7ee22
Delete empty file, causing tools.namespace to NPE!
malcolmsparks Oct 3, 2018
545ef3b
Add namespace loading guard
SevereOverfl0w Oct 15, 2018
b6cbb44
Add support for figwheel-main
SevereOverfl0w Oct 16, 2018
dbbb11e
Fix notify for sass
SevereOverfl0w Oct 16, 2018
ef8f26d
Make figwheel main's halt! idempotent
SevereOverfl0w Nov 23, 2018
2169732
Fix target directory comparison
SevereOverfl0w Dec 6, 2018
8403705
Remove pack from watch-dirs for figwheel main
SevereOverfl0w Dec 6, 2018
96ea90e
Correct function name
SevereOverfl0w Dec 6, 2018
a58b783
Remove debugging pprint
SevereOverfl0w Jan 19, 2019
7e16b7a
Fix lib directory filtering
SevereOverfl0w Jan 21, 2019
06063be
Fix kick debounce agent failure condition
SevereOverfl0w Feb 1, 2019
0c61efd
Add target relativization to cljs :source-map
SevereOverfl0w Apr 30, 2020
e498d06
Disable cljs temp dir when using source map
SevereOverfl0w Apr 30, 2020
9e47342
Update to clojure.basis
SevereOverfl0w Oct 5, 2020
e552e31
Merge pull request #1 from SevereOverfl0w/clojure.basis
malcolmsparks Oct 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.cpcache
/.nrepl-port
/target
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright © 2018 Dominic Monroe
Copyright © 2018 JUXT LTD.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
79 changes: 13 additions & 66 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,79 +1,26 @@
= Krei
= Kick

A build-tool tailored for solving problems I have.

== Rationale

Krei is trying to solve the following problems:

. Building web-apps using the `clj` command line tool
. Building applications in a mono-repo, where your _dependencies_ have builds too
Kick off internal processes, like builds, when files change.

== Usage

.Add to deps.edn
[source]
----
io.dominic/krei.alpha {:git/url "https://github.com/SevereOverfl0w/krei.alpha.git"
:sha "a18a13e83f81fde9eb437ec08c0426e90f0a8161"}
----

.Ensure target exists before starting the JVM
[source]
----
$ mkdir -p target
$ touch target/.gitkeep
$ git add target/.gitkeep
$ echo "**/target/**
!**/target/.gitkeep" >> .gitignore
----

[source,clojure]
.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
Fuller documentation on its way. For now, see usage in https://github.com/juxt/edge[Edge].

=== During development
== Authors

[source,clojure]
.dev/load-krei.clj
----
(ns ^{:clojure.tools.namespace.repl/load false}
load-krei
(:require
[io.dominic.krei.alpha.core :as krei]))
Kick is derived from https://github.com/SevereOverfl0w/krei.alpha[krei], conceived and written by Dominic Monroe.

(def krei (krei/watch))
----
* Dominic Monroe ([email protected])
* Malcolm Sparks ([email protected])

[source,clojure]
.dev/user.clj
----
(ns user
(:require [load-krei]))
----
== Copyright & License

=== Building for Production
The MIT License (MIT)

I designed this to be run as part of a makefile or shell script.
Copyright © 2018 JUXT LTD.

[source]
----
$ clj -m io.dominic.krei.alpha.main production "$output-directory"
----
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

== FAQ
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

[qanda]
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.
Will you support X?:: Maybe. I'm still figuring out the direction of Krei.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12 changes: 7 additions & 5 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

:deps
{org.clojure/clojure {:mvn/version "1.9.0"}
deraen/sass4clj {:mvn/version "0.3.1"}
me.raynes/fs {:mvn/version "1.4.6"}
juxt/dirwatch {:mvn/version "0.2.3"}
org.clojure/java.classpath {:mvn/version "0.3.0"}

figwheel-sidecar {:mvn/version "0.5.16"}
org.clojure/clojurescript {:mvn/version "1.9.946"}}}
org.clojure/java.classpath {:mvn/version "0.3.0"}}

:aliases
{:provider/figwheel
{:extra-deps
{figwheel-sidecar {:mvn/version "0.5.17-SNAPSHOT"
:exclusions [org.clojure/tools.nrepl]}}}}}
46 changes: 46 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>juxt</groupId>
<artifactId>kick.alpha</artifactId>
<version>0.1.0</version>
<name>kick.alpha</name>
<dependencies>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
<version>1.9.0</version>
</dependency>
<dependency>
<groupId>me.raynes</groupId>
<artifactId>fs</artifactId>
<version>1.4.6</version>
</dependency>
<dependency>
<groupId>juxt</groupId>
<artifactId>dirwatch</artifactId>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>java.classpath</artifactId>
<version>0.3.0</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
</build>
<distributionManagement>
<repository>
<id>clojars</id>
<name>Clojars repository</name>
<url>https://clojars.org/repo</url>
</repository>
</distributionManagement>
<repositories>
<repository>
<id>clojars</id>
<url>https://repo.clojars.org/</url>
</repository>
</repositories>
</project>
166 changes: 0 additions & 166 deletions src/io/dominic/krei/alpha/core.clj

This file was deleted.

12 changes: 0 additions & 12 deletions src/io/dominic/krei/alpha/main.clj

This file was deleted.

Loading