2023-11-07 02:19:40 +09:00
|
|
|
const { globSync } = require('glob');
|
|
|
|
const { join } = require("node:path");
|
|
|
|
const fs = require("node:fs");
|
|
|
|
const exec = require("execa");
|
2023-11-17 09:44:07 +09:00
|
|
|
const YAML = require('yaml')
|
2023-11-07 02:19:40 +09:00
|
|
|
|
|
|
|
const files = globSync('**/package.json');
|
|
|
|
|
|
|
|
for (const file of files) {
|
|
|
|
const json = require(join('../', file));
|
|
|
|
json['devDependencies'] = undefined;
|
|
|
|
fs.writeFileSync(file, JSON.stringify(json, null, '\t'));
|
|
|
|
}
|
|
|
|
|
2023-11-17 09:44:07 +09:00
|
|
|
const file = join('./', '.yarnrc.yml');
|
|
|
|
const yarnrc = YAML.parse(fs.readFileSync(file, 'utf8'));
|
|
|
|
yarnrc['supportedArchitectures'] = {
|
|
|
|
cpu: ['current'],
|
|
|
|
libc: ['current'],
|
|
|
|
os: ['current'],
|
|
|
|
};
|
|
|
|
fs.writeFileSync(file, YAML.stringify(yarnrc));
|
|
|
|
|
|
|
|
|
2023-11-07 02:19:40 +09:00
|
|
|
exec("yarn", ["install"], {
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|