boot-clj/boot-sources

Name: boot-sources

Owner: boot-clj

Description: Boot tasks to move, collect, manage source files.

Created: 2017-07-28 10:21:19.0

Updated: 2017-12-06 20:28:57.0

Pushed: 2017-07-28 13:59:01.0

Homepage: null

Size: 34

Language: Clojure

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

boot-sources

Clojars Project

Boot tasks that collects source files #{.clj .cljs .cljc .js} and do something with them.

-env! :dependencies '[[powerlaces/boot-sources "X.Y.Z" :scope "test"]])
uire '[powerlaces.boot-sources :refer :all])
Usage
pack-sources

Include pack-sources at any point of your task chain. For instance from the command line:

 cljs sass pack-sources -d "org.clojure/clojurescript:1.8.34" target

If you look in the target folder you will see that a clj-src dir has been created (the default if you don't specify :to-dir) and it now contains the ClojureScript sources.

As usual, boot pack-sources -h shows you the option summary.

Note that if you don't specify -d|--dependencies, the current (get-env) will be queried and all the dependencies in build.boot will be included.

This time in the repl, another example that dumps everything to the target folder:

uire '[powerlaces.boot-sources :refer [pack-sources]])

t (pack-sources :dependencies #{['org.clojure/clojurescript "1.8.34"]}
                :exclude #{#"project.clj"
                           #"third_party\/closure\/.*base.js$"
                           #"third_party\/closure\/.*deps.js$"
                           #"org\/clojure\/clojure\/.*$"}
                :exclusions '#{org.clojure/clojure
                               org.mozilla/rhino})
  (built-in/target))

This is particularly useful for self-hosted REPL apps, which requires (pun intended) source files along with the deployed app in order to work properly. For more info see here.

Contributing

I suggest first of all to open an issue explaining what is missing and why you think it should be added. If the reason is compelling, run boot auto-test and freely hack away.

License

Copyright © 2016 Andrea Richiardi & Scalac Sp. z o.o.
Copyright © 2017 Andrea Richiardi

Distributed under the Eclipse Public License, the same as Clojure.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.