machine:
  node:
    version: v8.2.0
  environment:
    JVM_OPTS: "-Xms512m -Xmx1024m"
dependencies:
  override:
    - lein deps
    - npm install -g karma-cli
    - npm install
    - rm -rf node_modules/react node_modules/react-dom node_modules/create-react-class node_modules/@cljs-oss
test:
  override:
    # Cljsjs - browser
    - lein with-profile test do clean, doo chrome-headless client once
    - test -f out/cljsjs/react/development/react.inc.js

    # Cljsjs - Production build - Browser
    - lein with-profile prod-test do clean, doo chrome-headless client once

    # Node Modules - Browser
    - npm install
    - lein with-profile test do clean, doo chrome-headless client once
    - test -f out/node_modules/react/index.js

    # Node Modules - Node Target
    - lein with-profile node-test do clean, doo node client once
    - test -f out/node_modules/react/index.js

machine:
  node:
    version: v8.2.0
  environment:
    JVM_OPTS: "-Xms512m -Xmx1024m"
dependencies:
  override:
    - lein deps
    - npm install -g karma-cli
    - npm install
    - rm -rf node_modules/react node_modules/react-dom node_modules/create-react-class node_modules/@cljs-oss
test:
  override:
    # Cljsjs - browser
    - lein with-profile test do clean, doo chrome-headless client once
    - test -f out/cljsjs/react/development/react.inc.js

    # Cljsjs - Production build - Browser
    - lein with-profile prod-test do clean, doo chrome-headless client once

    # Node Modules - Browser
    - npm install
    - lein with-profile test do clean, doo chrome-headless client once
    - test -f out/node_modules/react/index.js

    # Node Modules - Node Target
    - lein with-profile node-test do clean, doo node client once
    - test ! -f out/node_modules/react/index.js
    - grep "reagent.impl.template.node\$module\$react = require('react')" out/reagent/impl/template.js

Fix Node target file checks
Fix Node target file checks
