Skip to content
Snippets Groups Projects
Commit b9eb3ff7 authored by Cam Saul's avatar Cam Saul
Browse files

Disable webpack minification on CircleCI :unamused:

parent 8fd3e541
Branches
Tags
No related merge requests found
......@@ -9,5 +9,5 @@ test:
# 2) runs Eastwood linter
# 3) runs JS linter + Bikeshed linter
# 4) runs lein uberjar
- case $CIRCLE_NODE_INDEX in 0) MB_TEST_DATASETS=generic-sql,mongo lein test ;; 1) MB_DB_TYPE=postgres MB_DB_DBNAME=circle_test MB_DB_PORT=5432 MB_DB_USER=ubuntu MB_DB_HOST=localhost lein test ;; 2) lein eastwood ;; 3) ./lint_js.sh && lein bikeshed --max-line-length 240 ;; 4) lein uberjar ;; esac:
- case $CIRCLE_NODE_INDEX in 0) MB_TEST_DATASETS=generic-sql,mongo lein test ;; 1) MB_DB_TYPE=postgres MB_DB_DBNAME=circle_test MB_DB_PORT=5432 MB_DB_USER=ubuntu MB_DB_HOST=localhost lein test ;; 2) lein eastwood ;; 3) ./lint_js.sh && lein bikeshed --max-line-length 240 ;; 4) CI_DISABLE_WEBPACK_MINIFICATION=1 lein uberjar ;; esac:
parallel: true
(ns leiningen.webpack
(:use clojure.java.shell))
(:require [clojure.java.shell :refer :all]))
;; Set the CI_DISABLE_WEBPACK_MINIFICATION environment variable to skip minification which takes ~6+ minutes on CircleCI
(defn webpack [projects & args]
;; TODO - some better validations such as checking that we have webpack available
(println "Running `webpack -p` to assemble and minify frontend assets")
(let [result (sh (str (:root projects) "/node_modules/webpack/bin/webpack.js") "-p")]
(let [result (sh (str (:root projects) "/node_modules/webpack/bin/webpack.js") (when-not (System/getenv "CI_DISABLE_WEBPACK_MINIFICATION")
"-p"))]
(if (= 0 (:exit result))
(println (:out result))
(println (:err result)))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment