mbland/custom-links

View on GitHub
.config/env.template

Summary

Maintainability
Test Coverage
#! /usr/bin/env bash
#
# Environment variables for local project configuration
#
# If desired, copy this file to .config/env.local and modify these variables as
# necessary to configure your workspace based on your system. At a minimum, you
# may wish to set SELENIUM_BROWSER, and possibly KARMA_BROWSERS.
#
# The ./go script will source .config/env.local automatically if it exists.
# You're free to include any other environment variables in .config/env.local
# that you wish; this template contains only those used directly by project
# scripts and components.
#
# Command-line overrides
# ----------------------
# Except for the `*_BIN` variables, all of these may be overridden using command
# line prefix assignments, e.g.:
#
#  $ SELENIUM_BROWSER=safari ./go test end-to-end
#
# Running Karma
# -------------
# You may wish to source this file directly to set KARMA_BROWSERS before running
# `karma start`, or override it on the command line, e.g.:
#
# $ KARMA_BROWSERS='Chrome,Firefox' karma start
#
# Windows Subsystem for Linux issues
# ----------------------------------
# PhantomJS currently doesn't work with Karma or live-server, likely due to a
# websockets issue:
#
# - https://github.com/karma-runner/karma-phantomjs-launcher/issues/124
# - https://github.com/Microsoft/BashOnWindows/issues/903
#
# The binary packaged with the edge-launcher npm also doesn't currently work
# with Windows Subsystem for Linux, so Edge should not be specified in this
# environment either.
#
# In fact, Karma shouldn't be used at all with Windows Subsystem for Linux
# currently, as none of the launchers launch the browsers properly even when the
# `*_BIN` paths are correctly defined. (This is likely due to the fact that the
# Windows programs can't process the Window Subsystem for Linux current
# directory and file paths.)

# When COVERAGE_REPORT_SERVER is 'false', the `./go test --coverage` (and
# related commands) won't open a browser window after coverage collection. With
# it set to 'true', it will open it using `live-server`, which is preferable to
# opening it with `xdg-open` on Windows Subsystem for Linux. When it's empty
# (and `CI` isn't set), it will attempt to open the report directly using
# `xdg-open` (Linux) or `open` (macOS).

export COVERAGE_REPORT_SERVER="${COVERAGE_REPORT_SERVER:-true}"

# Defines the browser used with `./go test end-to-end`. By default the
# selenium-webdriver package will use Google Chrome. If you do not have Google
# Chrome installed on your system, you'll need to set this differently.
#
# For more information, see: https://www.npmjs.com/package/selenium-webdriver

export SELENIUM_BROWSER="${SELENIUM_BROWSER:-phantomjs}"

# Defines the browsers that Karma should use. For available browsers, see:
#
# - node_modules/karma-detect-browsers/browsers/index.js

export KARMA_BROWSERS="${KARMA_BROWSERS:-Chrome,Firefox,IE,Edge}"

# When DISABLE_KARMA is set to 'true', `./go test` will not run Karma. It's
# automatically set to 'true' on Windows Subsystem for Linux.

export DISABLE_KARMA="${DISABLE_KARMA:-}"

# The following define environment variables used by karma-detect-browsers and
# the karma-*-launcher packages.

export CHROME_BIN=''
export CHROME_CANARY_BIN=''
export EDGE_BIN=''
export FIREFOX_BIN=''
export FIREFOX_NIGHTLY_BIN=''
export IE_BIN=''
export OPERA_BIN=''
export SAFARI_BIN=''
export SAFARI_TECH_PREVIEW_BIN=''