mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Packaging: clear existing lib directories
This commit is contained in:
parent
f31011d759
commit
4d3c9ae3d1
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
// Populate contents of all packages with the current GitHub release
|
// Populate contents of all packages with the current GitHub release
|
||||||
|
|
||||||
const { writeFile, copyFile } = require('node:fs/promises');
|
const { writeFile, copyFile, rm } = require('node:fs/promises');
|
||||||
const path = require('node:path');
|
const path = require('node:path');
|
||||||
const { Readable } = require('node:stream');
|
const { Readable } = require('node:stream');
|
||||||
const { pipeline } = require('node:stream/promises');
|
const { pipeline } = require('node:stream/promises');
|
||||||
@ -46,10 +46,12 @@ workspaces.map(async platform => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Extract prebuild tarball
|
// Extract prebuild tarball
|
||||||
|
const lib = path.join(dir, 'lib');
|
||||||
|
await rm(lib, { recursive: true });
|
||||||
await pipeline(
|
await pipeline(
|
||||||
Readable.fromWeb(response.body),
|
Readable.fromWeb(response.body),
|
||||||
createGunzip(),
|
createGunzip(),
|
||||||
extract(path.join(dir, 'lib'), { map: mapTarballEntry })
|
extract(lib, { map: mapTarballEntry })
|
||||||
);
|
);
|
||||||
// Generate README
|
// Generate README
|
||||||
const { name, description } = require(`./${platform}/package.json`);
|
const { name, description } = require(`./${platform}/package.json`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user