From a2f445eb99687b9a0218838de73f622f56bec517 Mon Sep 17 00:00:00 2001 From: Juho Teperi Date: Wed, 20 Dec 2017 19:52:23 +0200 Subject: [PATCH 1/2] Report prod bundle size on CI --- package.json | 1 + test-environments/browser-umd-prod/test.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/package.json b/package.json index 5cf5c80..ab4f6f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "private": true, "devDependencies": { + "gzip-size-cli": "^2.1.0", "karma": "1.7.1", "karma-chrome-launcher": "2.2.0", "karma-cljs-test": "0.1.0", diff --git a/test-environments/browser-umd-prod/test.sh b/test-environments/browser-umd-prod/test.sh index bb788bf..c015e8e 100755 --- a/test-environments/browser-umd-prod/test.sh +++ b/test-environments/browser-umd-prod/test.sh @@ -2,3 +2,4 @@ set -ex lein do clean, doo chrome-headless prod-test once test -f target/cljsbuild/prod-test/main.js +../../node_modules/.bin/gzip-size target/cljsbuild/prod-test/main.js From f93dc7f756633029b5f056e672290cd2147a749a Mon Sep 17 00:00:00 2001 From: Juho Teperi Date: Thu, 8 Mar 2018 19:29:46 +0200 Subject: [PATCH 2/2] Test with foreign libs in node --- project.clj | 2 +- test-environments/node-foreign-libs/demo | 1 + test-environments/node-foreign-libs/examples | 1 + test-environments/node-foreign-libs/package-lock.json | 1 + test-environments/node-foreign-libs/package.json | 1 + test-environments/node-foreign-libs/project.clj | 1 + test-environments/node-foreign-libs/site | 1 + test-environments/node-foreign-libs/src | 1 + test-environments/node-foreign-libs/test | 1 + test-environments/node-foreign-libs/test.sh | 4 ++++ 10 files changed, 13 insertions(+), 1 deletion(-) create mode 120000 test-environments/node-foreign-libs/demo create mode 120000 test-environments/node-foreign-libs/examples create mode 120000 test-environments/node-foreign-libs/package-lock.json create mode 120000 test-environments/node-foreign-libs/package.json create mode 120000 test-environments/node-foreign-libs/project.clj create mode 120000 test-environments/node-foreign-libs/site create mode 120000 test-environments/node-foreign-libs/src create mode 120000 test-environments/node-foreign-libs/test create mode 100755 test-environments/node-foreign-libs/test.sh diff --git a/project.clj b/project.clj index ecb0adb..68f82f9 100644 --- a/project.clj +++ b/project.clj @@ -4,7 +4,7 @@ :description "A simple ClojureScript interface to React" :dependencies [[org.clojure/clojure "1.8.0"] - [org.clojure/clojurescript "1.9.946"] + [org.clojure/clojurescript "1.10.126"] ;; If :npm-deps enabled, these are used only for externs. ;; Without direct react dependency, other packages, ;; like react-leaflet might have closer dependency to a other version. diff --git a/test-environments/node-foreign-libs/demo b/test-environments/node-foreign-libs/demo new file mode 120000 index 0000000..bf71256 --- /dev/null +++ b/test-environments/node-foreign-libs/demo @@ -0,0 +1 @@ +../../demo \ No newline at end of file diff --git a/test-environments/node-foreign-libs/examples b/test-environments/node-foreign-libs/examples new file mode 120000 index 0000000..d15735c --- /dev/null +++ b/test-environments/node-foreign-libs/examples @@ -0,0 +1 @@ +../../examples \ No newline at end of file diff --git a/test-environments/node-foreign-libs/package-lock.json b/test-environments/node-foreign-libs/package-lock.json new file mode 120000 index 0000000..322001a --- /dev/null +++ b/test-environments/node-foreign-libs/package-lock.json @@ -0,0 +1 @@ +../../package-lock.json \ No newline at end of file diff --git a/test-environments/node-foreign-libs/package.json b/test-environments/node-foreign-libs/package.json new file mode 120000 index 0000000..138a42c --- /dev/null +++ b/test-environments/node-foreign-libs/package.json @@ -0,0 +1 @@ +../../package.json \ No newline at end of file diff --git a/test-environments/node-foreign-libs/project.clj b/test-environments/node-foreign-libs/project.clj new file mode 120000 index 0000000..3737a29 --- /dev/null +++ b/test-environments/node-foreign-libs/project.clj @@ -0,0 +1 @@ +../../project.clj \ No newline at end of file diff --git a/test-environments/node-foreign-libs/site b/test-environments/node-foreign-libs/site new file mode 120000 index 0000000..94a7c71 --- /dev/null +++ b/test-environments/node-foreign-libs/site @@ -0,0 +1 @@ +../../site \ No newline at end of file diff --git a/test-environments/node-foreign-libs/src b/test-environments/node-foreign-libs/src new file mode 120000 index 0000000..929cb3d --- /dev/null +++ b/test-environments/node-foreign-libs/src @@ -0,0 +1 @@ +../../src \ No newline at end of file diff --git a/test-environments/node-foreign-libs/test b/test-environments/node-foreign-libs/test new file mode 120000 index 0000000..9a3b79e --- /dev/null +++ b/test-environments/node-foreign-libs/test @@ -0,0 +1 @@ +../../test \ No newline at end of file diff --git a/test-environments/node-foreign-libs/test.sh b/test-environments/node-foreign-libs/test.sh new file mode 100755 index 0000000..7bdb897 --- /dev/null +++ b/test-environments/node-foreign-libs/test.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -ex +lein do clean, doo node node-test once +test -f target/cljsbuild/node-test/out/cljsjs/react/development/react.inc.js