-
-
Save ashnur/5b21d929572bad24b5e26e09f8a27c24 to your computer and use it in GitHub Desktop.
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
(set-env! | |
:resource-paths #{"resources"} | |
:dependencies '[[cljsjs/boot-cljsjs "0.5.2" :scope "test"]]) | |
(require '[cljsjs.boot-cljsjs.packaging :refer :all] | |
'[boot.core :as boot] | |
'[boot.tmpdir :as tmpd] | |
'[clojure.java.io :as io] | |
'[boot.util :refer [sh]]) | |
(def +lib-version+ "0.3.4") | |
(def +version+ (str +lib-version+ "-0")) | |
(task-options! | |
pom {:project 'cljsjs/jsnetworkx | |
:version +version+ | |
:description "Interface to the Ethereum blockchain providing contract creation and transactions, state inspection, and dApp registration and management" | |
:url "https://github.com/ashnur/jsnetworkx/" | |
:scm {:url "https://github.com/cljsjs/packages"} | |
:license {"MIT" "https://opensource.org/licenses/MIT"}}) | |
(deftask build-blockapps [] | |
(let [tmp (boot/tmp-dir!)] | |
(with-pre-wrap | |
fileset | |
;; Copy all files in fileset to temp directory | |
(doseq [f (->> fileset boot/input-files) | |
:let [target (io/file tmp (tmpd/path f))]] | |
(io/make-parents target) | |
(io/copy (tmpd/file f) target)) | |
(binding [boot.util/*sh-dir* (str (io/file tmp (format "JSNetworkX-%s" +lib-version+)))] | |
(sh "ls" "-la") | |
;; ((sh "npm" "run" "build:browser")) | |
) | |
(-> fileset (boot/add-resource tmp) boot/commit!)))) | |
(deftask package [] | |
(comp | |
(download :url (format "https://github.com/ashnur/jsnetworkx/archive/v%s.zip" +lib-version+) | |
:checksum "EC7308FFCC1509B5BAC91C54FBFA22F2" | |
:unzip true) | |
(build-blockapps) | |
(sift :move {#".*jsnetworkx\.js$" "cljsjs/jsnetworkx/cljsjs/jsnetworkx.inc.js"}) | |
(sift :include #{#"^cljsjs"}) | |
(deps-cljs :name "cljsjs.blockapps") | |
(pom) | |
(jar))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment