tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

make_bundle.sh (753B)


      1 #!/usr/bin/env bash
      2 # This Source Code Form is subject to the terms of the Mozilla Public
      3 # License, v. 2.0. If a copy of the MPL was not distributed with this
      4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      5 
      6 # This script bundles all vendored ProseMirror packages in this directory.
      7 
      8 set -euo pipefail
      9 
     10 cd "$(dirname "${BASH_SOURCE[0]}")"
     11 MACH=$(realpath "../../../mach")
     12 
     13 # Install local dependencies
     14 "$MACH" npm install
     15 
     16 # Build the bundle
     17 "$MACH" npm run build
     18 
     19 # Remove artifacts
     20 rm -rf node_modules package-lock.json prosemirror-*/{dist,node_modules,package-lock.json}
     21 
     22 # Report bundle size
     23 if [[ -f prosemirror.bundle.mjs ]]; then
     24  BUNDLE_SIZE=$(ls -lh prosemirror.bundle.mjs | awk '{print $5}')
     25  echo "Bundle size: $BUNDLE_SIZE"
     26 fi