make metrics server build script an action, update docs

This commit is contained in:
Trevor Johnston 2018-12-10 14:22:47 -05:00
parent 907faae795
commit 23ccafc3bd
2 changed files with 5 additions and 31 deletions

View file

@ -14,20 +14,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if (( $# <= 1 )); then
echo "Invalid arguments, usage:"
echo "build.sh <outdir> <config>"
exit 1;
fi
readonly MODULE_DIR=$(dirname $0)
readonly OUT_DIR=$1
readonly CONFIG_FILE=$2
# Compile the server.
rm -rf $OUT_DIR
tsc -p $MODULE_DIR/tsconfig.json --outDir $OUT_DIR
cp -r $MODULE_DIR/package.json $OUT_DIR
# Copy config file.
cp -r $CONFIG_FILE $OUT_DIR/config.json
tsc -p $(dirname $0)

View file

@ -2,21 +2,11 @@
"compilerOptions": {
"target": "es2016",
"removeComments": false,
"noImplicitAny": true,
"strict": true,
"module": "commonjs",
"rootDir": ".",
"lib": [
"dom",
"es2016"
]
"outDir": "../../build/metrics_server"
},
"include": [
"index.ts",
"post_server_report.ts",
"types/**/*.d.ts"
],
"exclude": [
"node_modules"
],
"compileOnSave": true
"**/*.ts"
]
}