Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: uuidjs/uuid
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0237e7354372507ae2d7c41b949ea26302f907d0
Choose a base ref
..
head repository: uuidjs/uuid
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c1e179c9fc03f6f47067dea252441e40612cbeff
Choose a head ref
Showing with 14 additions and 0 deletions.
  1. +14 −0 scripts/build.sh
14 changes: 14 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -11,6 +11,20 @@ DIR="$ROOT/dist"
rm -rf "$DIR"
mkdir -p "$DIR"

# We ship 4 builds of this library: ESM and CommonJS, each for Node.js and the Browser.
# In ./src, code that uses browser APIs lives in `-browser.js` files, while code for node APIs
# lives in files without suffix.
# For historical reasons, the Node.js CommonJS build lives in the top level ./dist directory while
# the other 3 builds live in their respective ./dist/{commonjs,esm}-{node,browser}/ subdirectories.
#
# The code below produces this layout:
#
# dist (<-- the commonjs-node build)
# ├── commonjs-browser
# ├── esm-node
# ├── esm-node
# └── bin (<-- Node.js CLI)

# Transpile CommonJS versions of files for node
babel --env-name commonjsNode src --source-root src --out-dir "$DIR" --copy-files --quiet