]> git.proxmox.com Git - mirror_xterm.js.git/blame - bin/build
Remove `export` from build script
[mirror_xterm.js.git] / bin / build
CommitLineData
56ecc77d 1#! /usr/bin/env bash
ed1a31d1 2
6cc66a0b
PK
3set -e
4
5# $BUILD_DIR should default to "build"
70ec2496 6BUILD_DIR=${BUILD_DIR:=build}
6cc66a0b 7
243d7661
PK
8# Create the build directory
9mkdir -p $BUILD_DIR
10
11
83b06c6b
DI
12# Clean out/* to prevent confusion if files were deleted in src/
13rm -rf out/*
14
56ecc77d
DI
15# Build all TypeScript files (including tests) to out/
16tsc
17
6cc66a0b
PK
18# Concat all xterm.js files into a single file and output as a UMD to $BUILD_DIR/xterm.js
19browserify ./out/xterm.js --standalone Terminal --debug --outfile ./$BUILD_DIR/xterm.js
20cat ./$BUILD_DIR/xterm.js | exorcist ./$BUILD_DIR/xterm.js.map -b ./$BUILD_DIR > ./$BUILD_DIR/xterm.temp.js
21rm ./$BUILD_DIR/xterm.js
22mv ./$BUILD_DIR/xterm.temp.js ./$BUILD_DIR/xterm.js
c63732ef 23
6cc66a0b
PK
24# Resolve the chain of sourcemaps so that ./$BUILD_DIR/xterm.js.map points at ./src
25sorcery -i $BUILD_DIR/xterm.js
56ecc77d 26
6cc66a0b 27# Copy all CSS files from src/ to $BUILD_DIR/
56ecc77d 28cd src
6cc66a0b 29find . -name '*.css' | cpio -pdm ../$BUILD_DIR
56ecc77d
DI
30cd ..
31
6cc66a0b 32# Copy addons from out/ to $BUILD_DIR/
56ecc77d 33cd out/addons
6cc66a0b 34find . -name '*.js' | cpio -pdm ../../$BUILD_DIR/addons
56ecc77d 35cd ../..