mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
20 lines
478 B
JavaScript
20 lines
478 B
JavaScript
// Copyright 2013 Lovell Fuller and others.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
/* global Module, ENV, _vips_shutdown, _uv_library_shutdown */
|
|
|
|
Module.preRun = () => {
|
|
ENV.VIPS_CONCURRENCY = Number(process.env.VIPS_CONCURRENCY) || 1;
|
|
};
|
|
|
|
Module.onRuntimeInitialized = () => {
|
|
module.exports = Module.emnapiInit({
|
|
context: require('@emnapi/runtime').getDefaultContext()
|
|
});
|
|
|
|
process.once('exit', () => {
|
|
_vips_shutdown();
|
|
_uv_library_shutdown();
|
|
});
|
|
};
|