forked from vercel/nft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare-install.js
22 lines (18 loc) · 935 Bytes
/
prepare-install.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const { unlinkSync, readFileSync, writeFileSync } = require('fs');
const { join } = require('path');
const isWin = process.platform === 'win32';
if (isWin) {
const pkgJson = readFileSync(join(__dirname, 'package.json'), 'utf8');
const pkg = JSON.parse(pkgJson);
//unlinkSync(join(__dirname, 'yarn.lock'));
// Delete the integration tests that will never work in Windows
unlinkSync(join(__dirname, 'test', 'integration', 'argon2.js'));
unlinkSync(join(__dirname, 'test', 'integration', 'highlights.js'));
unlinkSync(join(__dirname, 'test', 'integration', 'hot-shots.js'));
unlinkSync(join(__dirname, 'test', 'integration', 'loopback.js'));
unlinkSync(join(__dirname, 'test', 'integration', 'playwright-core.js'));
delete pkg.devDependencies['argon2'];
delete pkg.devDependencies['highlights'];
delete pkg.devDependencies['hot-shots'];
writeFileSync(join(__dirname, 'package.json'), JSON.stringify(pkg));
}