Fork me on GitHub
#boot
<
2017-11-12
>
Sebastian Hennebrueder00:11:27

I try to package output of npm build in gui/dist/ into target/resources/public This try does not work at all `(deftask include-gui-build "Include gui build" [] (with-pre-wrap fs (-> fs (add-resource (http://clojure.java.io/file "gui/dist")) (mv #"(.*)" "resources/public/$1") (commit!))))`

Sebastian Hennebrueder00:11:23

And replacing mv with a sift command, moves everything including the AOT output to the subdirectory ` (deftask build "Build the project" [] (comp (pom) (aot :namespace #{'timesheet.main}) (include-gui-build) (sift :move {#"(.*)" "resources/public/$1"}) (uber) (jar :main 'timesheet.main) (sift :include #{#".*jar"}) (target))) `

mudphone00:11:32

I have a quick question on creating asset files in a custom boot task. In general, is the process to: - create a tmp-dir with (let [x (c/tmp-dir!)] ...), then (.getPath x) on the tmp-dir, write files to that path, and then (c/add-asset fileset x) and (c/commit! fileset)?

dave00:11:39

@happy.lisper you can include the boot libraries as dependencies, and (:require [boot.cli :refer (defclifn)]) in the namespace where you want to use it

dave00:11:04

i forget which dependency jar includes boot.cli, maybe boot/core? https://clojars.org/boot/core

Andy02:11:16

@dave this is what I tried to do actually, however I am getting java.lang.NoClassDefFoundError: boot/App. The uber jar builds fine, but it throws at an running attempt. Based on https://github.com/adzerk-oss/boot-uberjar-example.git I replaced main with:

(ns main.entrypoint
  (:require [my-namespace] [boot.cli :as cli])
  (:gen-class))

(cli/defclifn -main
  "docstring"
  [x xx VALUE kw "xxx"]
  (prn xx))

seancorfield04:11:17

I haven't forgotten about the boot-marginalia task I "promised" earlier this week. I've been working on some additions to Marginalia itself that add a couple of new options for handling inline comments and I'll want to expose those in the Boot task, so I'm just holding off extracting it from our code base until that's all merged and a new version of Marginalia released.

seancorfield05:11:15

Since lein-marginalia (and Marginalia itself) rely heavily on being able to extract project-related information from project.clj, I'll be looking for feedback from y'all about common ways that folks specify project name, version, and description to try and automate for Boot some of what Marginalia does for Leiningen. I've already automated the dependencies listing.

gonewest81816:11:08

I’d like to see the dependencies listing part for that “jarkeeper” type service

dave13:11:58

@happy.lisper ah, interesting. i guess boot/App is in another dependency jar maybe try using this one, which is "the whole boot package"? https://clojars.org/boot

Andy17:11:25

thx for the tip, [boot/boot "2.7.x"] did not work but [boot/base "2.7.x"] made the trick 🙂 Now

Andy17:11:47

all works except -h which is passed down as meta in the boot code itself and then printed on a terminal

Andy17:11:56

not a big deal though