Initial
This commit is contained in:
@@ -5,9 +5,6 @@ if (fs.existsSync('dist/index.html')) {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
const result = spawnSync('npm', ['run', 'build'], {
|
||||
stdio: 'inherit',
|
||||
shell: process.platform === 'win32'
|
||||
});
|
||||
const result = spawnSync(process.execPath, ['node_modules/vite/bin/vite.js', 'build'], { stdio: 'inherit' });
|
||||
|
||||
process.exit(result.status ?? 1);
|
||||
|
||||
2
scripts/smoke-api-import.mjs
Normal file
2
scripts/smoke-api-import.mjs
Normal file
@@ -0,0 +1,2 @@
|
||||
await import('../server/forms/schemas.js');
|
||||
await import('../server/services/graphService.js');
|
||||
@@ -2,12 +2,12 @@ import { spawn } from 'node:child_process';
|
||||
|
||||
const mode = process.argv[2] || 'development';
|
||||
const watch = process.argv.includes('--watch');
|
||||
const command = watch ? 'nodemon' : 'node';
|
||||
const args = watch ? ['server/index.js'] : ['server/index.js'];
|
||||
const args = watch
|
||||
? ['node_modules/nodemon/bin/nodemon.js', 'server/index.js']
|
||||
: ['server/index.js'];
|
||||
|
||||
const child = spawn(command, args, {
|
||||
const child = spawn(process.execPath, args, {
|
||||
stdio: 'inherit',
|
||||
shell: process.platform === 'win32',
|
||||
env: {
|
||||
...process.env,
|
||||
NODE_ENV: mode
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { spawn } from 'node:child_process';
|
||||
|
||||
const child = spawn('vite', ['preview', '--host', '0.0.0.0', '--port', '3000', '--strictPort'], {
|
||||
const child = spawn(process.execPath, ['node_modules/vite/bin/vite.js', 'preview', '--host', '0.0.0.0', '--port', '3000', '--strictPort'], {
|
||||
stdio: 'inherit',
|
||||
shell: process.platform === 'win32',
|
||||
env: {
|
||||
...process.env,
|
||||
NODE_ENV: 'production'
|
||||
|
||||
Reference in New Issue
Block a user