Sharkey/scripts/dev.mjs
tamaina 4f80b6fa5d
chore: 以前の開発環境(backendにアクセスする方式)を立ち上げられるように (#13220)
* chore: 以前の開発環境(backendにアクセスする方式)を立ち上げられるように

* Update scripts/dev.mjs

Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>

---------

Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
2024-02-13 00:54:34 +09:00

95 lines
2.1 KiB
JavaScript

/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
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,
});
await execa('pnpm', ['build-assets'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
});
await execa('pnpm', ['--filter', 'misskey-js', 'ts'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
});
await execa('pnpm', ['--filter', 'misskey-reversi', 'build:tsc'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
});
await execa('pnpm', ['--filter', 'misskey-bubble-game', 'build:tsc'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
});
execa('pnpm', ['build-pre', '--watch'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
});
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', process.env.MK_DEV_PREFER === 'backend' ? 'dev' : 'watch'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
});
execa('pnpm', ['--filter', 'sw', 'watch'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
});
execa('pnpm', ['--filter', 'misskey-js', 'watch'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
});
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,
});