<commit_before>#!/bin/bash
set -eo pipefail

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Builds the React frontend, *only* if we are in CI.

# True if the environment variable 'CI' is NOT empty.
# In CircleCI, this variable is "true" and in local dev, it's "".
if [[ ! -z "${CI}" ]]; then
    # Because this is what create-react-app needs as a prefix
    export REACT_APP_SENTRY_PUBLIC_DSN=$FRONTEND_SENTRY_PUBLIC_DSN

    pushd frontend
    yarn --no-progress
    yarn run --no-progress build
    popd
else
    # If you're NOT in CI, you're most likely in a local development mode.
    # You need the Dockerfile to build as normal but you don't want to
    # build the production grade static assets necessarily (it's slow
    # and for local development you have the 'frontend' container in<commit_msg>Don't inline scripts in frontend (#1277)<commit_after>#!/bin/bash
set -eo pipefail

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Builds the React frontend, *only* if we are in CI.

# True if the environment variable 'CI' is NOT empty.
# In CircleCI, this variable is "true" and in local dev, it's "".
if [[ ! -z "${CI}" ]]; then
    # Because this is what create-react-app needs as a prefix
    export REACT_APP_SENTRY_PUBLIC_DSN=$FRONTEND_SENTRY_PUBLIC_DSN

    # We prefer to not leave any JavaScript as inline no matter how small.
    export INLINE_RUNTIME_CHUNK=false

    pushd frontend
    yarn --no-progress
    yarn run --no-progress build
    popd
else
    # If you're NOT in CI, you're most likely in a local development mode.
    # You need the Dockerfile to build as normal but you don't want to
    # build the production grade static assets necessarily (it's slow
    # and for local development you have the 'frontend' container in
{'fraction_non_alphanumeric': 0.07990314769975787, 'fraction_numerical': 0.005811138014527845, 'mean_word_length': 3.3221757322175733, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3267022', 'n_tokens_mistral': 658, 'n_tokens_neox': 618, 'n_words': 295}