Further speed improvements

- Store Emscripten cache inside node_modules/.em_cache. Docker image ships without LTO libs, so Emscripten has to rebuild stdlibs on every build otherwise.
 - Merge webp_enc + webp_dec build scripts. Core libwebp library is same in both cases, so there's no point in storing and building two copies of it.
This commit is contained in:
Ingvar Stepanyan
2020-05-11 22:19:28 +01:00
committed by Ingvar Stepanyan
parent 1542bfb7fd
commit de543b3206
22 changed files with 26 additions and 1228 deletions

9
codecs/webp/enc/webp_enc.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
import { EncodeOptions } from '../../src/codecs/webp/encoder-meta';
interface WebPModule extends EmscriptenWasm.Module {
encode(data: BufferSource, width: number, height: number, options: EncodeOptions): Uint8Array;
free_result(): void;
}
export default function(opts: EmscriptenWasm.ModuleOpts): WebPModule;