From 56ca7743a8232a73173e4f1fb31d4269c68dfd2e Mon Sep 17 00:00:00 2001 From: Paris Kasidiaris Date: Wed, 14 Dec 2016 01:10:03 +0200 Subject: [PATCH] Always build TypeScript in `lib/` --- .gitignore | 1 - bin/build | 12 ++++++------ package.json | 2 +- tsconfig.json | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 2cda856..0825b43 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ node_modules/ *.swp .lock-wscript -out/ lib/ Makefile.gyp *.Makefile diff --git a/bin/build b/bin/build index 2def2c2..c76dd7c 100755 --- a/bin/build +++ b/bin/build @@ -9,14 +9,14 @@ BUILD_DIR=${BUILD_DIR:=build} mkdir -p $BUILD_DIR -# Clean out/* to prevent confusion if files were deleted in src/ -rm -rf out/* +# Clean lib/* to prevent confusion if files were deleted in src/ +rm -rf lib/* -# Build all TypeScript files (including tests) to out/ +# Build all TypeScript files (including tests) to lib/ tsc # Concat all xterm.js files into a single file and output as a UMD to $BUILD_DIR/xterm.js -browserify ./out/xterm.js --standalone Terminal --debug --outfile ./$BUILD_DIR/xterm.js +browserify ./lib/xterm.js --standalone Terminal --debug --outfile ./$BUILD_DIR/xterm.js cat ./$BUILD_DIR/xterm.js | exorcist ./$BUILD_DIR/xterm.js.map -b ./$BUILD_DIR > ./$BUILD_DIR/xterm.temp.js rm ./$BUILD_DIR/xterm.js mv ./$BUILD_DIR/xterm.temp.js ./$BUILD_DIR/xterm.js @@ -29,7 +29,7 @@ cd src find . -name '*.css' | cpio -pdm ../$BUILD_DIR cd .. -# Copy addons from out/ to $BUILD_DIR/ -cd out/addons +# Copy addons from lib/ to $BUILD_DIR/ +cd lib/addons find . -name '*.js' | cpio -pdm ../../$BUILD_DIR/addons cd ../.. diff --git a/package.json b/package.json index 6e7bdd3..cd83738 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,6 @@ "test": "mocha --recursive ./lib", "build:docs": "jsdoc -c jsdoc.json", "build": "./bin/build", - "prepublish": "tsc --outDir lib" + "prepublish": "tsc" } } diff --git a/tsconfig.json b/tsconfig.json index 01e72bc..f4a5a1b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ "target": "es5", "rootDir": "src", "allowJs": true, - "outDir": "out", + "outDir": "lib", "sourceMap": true }, "exclude": [ -- 2.39.2