-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-dev.js
More file actions
36 lines (32 loc) · 916 Bytes
/
start-dev.js
File metadata and controls
36 lines (32 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import {spawn} from 'child_process';
const asciiArt = `
************
******************
*********************
***********************
*************************
*************************
*************************
***** ********* *****
****** ***** ******
******* ***** *******
#*******************
*****************
***************
***********
*******
`;
console.log(asciiArt);
console.log('Iniciando o ambiente local de desenvolvimento com Vite...\n');
const viteCommand = 'vite';
const viteProcess = spawn(viteCommand, [], {
stdio: 'inherit',
shell: true
});
// Opcional: Lidar com erros ao tentar iniciar o processo Vite
viteProcess.on('error', (err) => {
console.error(`Erro ao iniciar o Vite: ${err}`);
});
viteProcess.on('close', (code) => {
console.log(`Processo Vite encerrado com código ${code}`);
});