mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-09 04:43:09 +02:00
6e2d7e9792
* Use pnpm for package manager * Fix * Change github workflow * use pnpm in workflow * fix * Fix test (e2e/jest) * Update Dockerfile for pnpm * Exclude node_modules from file search on VSCode * Update pnpm-lock.yaml * Update pnpm-lock.yaml * Move typescript from devDependencies to dependencies * Fix Dockerfile Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
58 lines
1.2 KiB
JavaScript
58 lines
1.2 KiB
JavaScript
const execa = require('execa');
|
|
const fs = require('fs');
|
|
|
|
(async () => {
|
|
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,
|
|
});
|
|
|
|
execa('pnpm', ['dlx', 'gulp', 'watch'], {
|
|
cwd: __dirname + '/../',
|
|
stdout: process.stdout,
|
|
stderr: process.stderr,
|
|
});
|
|
|
|
execa('pnpm', ['--filter', 'backend', 'watch'], {
|
|
cwd: __dirname + '/../',
|
|
stdout: process.stdout,
|
|
stderr: process.stderr,
|
|
});
|
|
|
|
execa('pnpm', ['--filter', 'frontend', 'watch'], {
|
|
cwd: __dirname + '/../',
|
|
stdout: process.stdout,
|
|
stderr: process.stderr,
|
|
});
|
|
|
|
execa('pnpm', ['--filter', 'sw', 'watch'], {
|
|
cwd: __dirname + '/../',
|
|
stdout: process.stdout,
|
|
stderr: process.stderr,
|
|
});
|
|
|
|
const start = async () => {
|
|
try {
|
|
const exist = fs.existsSync(__dirname + '/../packages/backend/built/boot/index.js')
|
|
if (!exist) throw new Error('not exist yet');
|
|
|
|
await execa('pnpm', ['start'], {
|
|
cwd: __dirname + '/../',
|
|
stdout: process.stdout,
|
|
stderr: process.stderr,
|
|
});
|
|
} catch (e) {
|
|
await new Promise(resolve => setTimeout(resolve, 3000));
|
|
start();
|
|
}
|
|
};
|
|
|
|
start();
|
|
})();
|