2023-07-26 22:31:52 -07:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2023-07-07 21:03:31 -07: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,
|
|
|
|
});
|
|
|
|
|
|
|
|
await execa('pnpm', ['build-pre'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2023-09-07 00:56:17 -07:00
|
|
|
await execa('pnpm', ['build-assets'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2024-01-26 16:18:09 -08:00
|
|
|
await execa('pnpm', ['--filter', 'misskey-js', 'ts'], {
|
2023-12-14 03:16:02 -08:00
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2024-01-26 16:18:09 -08:00
|
|
|
await execa('pnpm', ['--filter', 'misskey-reversi', 'build:tsc'], {
|
2023-07-07 21:03:31 -07:00
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2024-01-26 16:18:09 -08:00
|
|
|
await execa('pnpm', ['--filter', 'misskey-bubble-game', 'build:tsc'], {
|
2023-07-07 21:03:31 -07:00
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2024-01-19 18:18:53 -08:00
|
|
|
execa('pnpm', ['build-pre', '--watch'], {
|
2023-07-07 21:03:31 -07:00
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2024-01-19 18:18:53 -08: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,
|
|
|
|
});
|
|
|
|
|
|
|
|
execa('pnpm', ['--filter', 'frontend', 'dev'], {
|
2023-07-07 21:03:31 -07:00
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2024-01-19 18:18:53 -08:00
|
|
|
execa('pnpm', ['--filter', 'sw', 'watch'], {
|
2023-12-14 03:16:02 -08:00
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
2024-01-19 18:11:20 -08:00
|
|
|
|
2024-01-26 16:18:09 -08:00
|
|
|
execa('pnpm', ['--filter', 'misskey-js', 'watch'], {
|
|
|
|
cwd: _dirname + '/../',
|
|
|
|
stdout: process.stdout,
|
|
|
|
stderr: process.stderr,
|
|
|
|
});
|
|
|
|
|
2024-01-19 18:11:20 -08: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,
|
|
|
|
});
|