forked from squint-cljs/squint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
477 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ lib | |
report.html | ||
test/scratch.js | ||
dist | ||
.work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,20 @@ | ||
(ns tasks | ||
(:require [babashka.process :refer [shell]] | ||
[clojure.edn :as edn] | ||
[clojure.java.io :as io])) | ||
|
||
(def core-config ) | ||
|
||
(def core-vars (:vars core-config)) | ||
|
||
(def core->js (:to-js core-config)) | ||
|
||
|
||
(defn shadow-extra-config [] | ||
(:require | ||
[babashka.fs :as fs] | ||
[babashka.process :refer [shell]] | ||
[clojure.edn :as edn] | ||
[clojure.java.io :as io])) | ||
(defn shadow-extra-config | ||
[] | ||
(let [core-config (edn/read-string (slurp (io/resource "cherry/cljs.core.edn"))) | ||
vars (:vars core-config) | ||
to-js (:to-js core-config) | ||
_ (prn to-js) | ||
ks (map #(get to-js % %) vars) | ||
ks (map #(symbol (munge %)) vars) | ||
vs (map #(symbol "cljs.core" (str %)) vars) | ||
core-map (zipmap ks vs)] | ||
(prn core-map) | ||
{:modules | ||
{:cljs_core {:exports core-map}}})) | ||
|
||
(defn build-cherry-npm-package [] | ||
(shell "npx shadow-cljs release cherry --config-merge" | ||
(shadow-extra-config))) | ||
(fs/create-dirs ".work") | ||
(spit ".work/config-merge.edn" (shadow-extra-config)) | ||
(shell "npx shadow-cljs --config-merge .work/config-merge.edn release cherry")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,5 @@ | |
(dissoc x :foo)) | ||
|
||
(log (str (foo {:foo 1 :bar 2}))) | ||
|
||
(prn (reverse (map (fn [x] (inc x)) [1 2 3]))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.