From a18d702f248dcbc35f7347aa1c03b94cdce23f2b Mon Sep 17 00:00:00 2001 From: Daniele Belardi Date: Fri, 2 Apr 2021 15:33:53 +0200 Subject: [PATCH] build(wasm): stricter dockerignore This reduces the context size from a few MB to a few KB. Minor cleanup in `examples/wasm.ts`. --- .dockerignore | 12 ++++++------ examples/wasm.ts | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.dockerignore b/.dockerignore index 67ae8f83..11b226d8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,6 @@ -node_modules -.github -bench -test -images -lib +* +!package.json +!package-lock.json +!tsconfig.json +!bin +!src diff --git a/examples/wasm.ts b/examples/wasm.ts index 7009af9a..995fed83 100644 --- a/examples/wasm.ts +++ b/examples/wasm.ts @@ -2,7 +2,7 @@ * A minimal Parser that mimicks a small fraction of the Node.js parser * API. * To run: - * - `npm run build` + * - `npm run build-wasm` * - `npx ts-node examples/wasm.ts` */ import { readFileSync } from 'fs'; @@ -63,7 +63,6 @@ const wasm_on_header_value = (p: number, at: number, length: number) => { const wasm_on_headers_complete = (p: number) => { const i = instMap.get(p); - console.log(get_type); const type = get_type(p); const versionMajor = get_version_major(p); const versionMinor = get_version_minor(p);