2023-07-27 05:31:52 +00:00
|
|
|
/*
|
2024-02-13 15:59:27 +00:00
|
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-27 05:31:52 +00:00
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2023-07-08 04:03:31 +00:00
|
|
|
import { dirname } from 'node:path';
|
|
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
import { execa } from 'execa';
|
|
|
|
|
|
|
|
const _filename = fileURLToPath(import.meta.url);
|
|
|
|
const _dirname = dirname(_filename);
|
|
|
|
|
|
|
|
await execa('pnpm', ['clean'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2024-03-30 06:28:19 +00:00
|
|
|
await Promise.all([
|
|
|
|
execa('pnpm', ['build-pre'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
}),
|
|
|
|
execa('pnpm', ['build-assets'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
}),
|
|
|
|
execa('pnpm', ['--filter', 'misskey-js', 'build'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
}),
|
|
|
|
]);
|
|
|
|
|
|
|
|
await Promise.all([
|
|
|
|
execa('pnpm', ['--filter', 'misskey-reversi', 'build'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
}),
|
|
|
|
execa('pnpm', ['--filter', 'misskey-bubble-game', 'build'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
}),
|
|
|
|
]);
|
2023-07-08 04:03:31 +00:00
|
|
|
|
2024-01-20 02:18:53 +00:00
|
|
|
execa('pnpm', ['build-pre', '--watch'], {
|
2023-07-08 04:03:31 +00:00
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2024-01-20 02:18:53 +00:00
|
|
|
execa('pnpm', ['build-assets', '--watch'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
|
|
|
execa('pnpm', ['--filter', 'backend', 'dev'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2024-09-09 11:57:36 +00:00
|
|
|
execa('pnpm', ['--filter', 'frontend-shared', 'watch'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2024-02-16 10:17:16 +00:00
|
|
|
execa('pnpm', ['--filter', 'frontend', process.env.MK_DEV_PREFER === 'backend' ? 'watch' : 'dev'], {
|
2023-07-08 04:03:31 +00:00
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2024-09-09 11:57:36 +00:00
|
|
|
execa('pnpm', ['--filter', 'frontend-embed', process.env.MK_DEV_PREFER === 'backend' ? 'watch' : 'dev'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2024-01-20 02:18:53 +00:00
|
|
|
execa('pnpm', ['--filter', 'sw', 'watch'], {
|
2023-12-14 11:16:02 +00:00
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
2024-01-20 02:11:20 +00:00
|
|
|
|
2024-01-27 00:18:09 +00:00
|
|
|
execa('pnpm', ['--filter', 'misskey-js', 'watch'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2024-01-20 02:11:20 +00:00
|
|
|
execa('pnpm', ['--filter', 'misskey-reversi', 'watch'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
|
|
|
execa('pnpm', ['--filter', 'misskey-bubble-game', 'watch'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|