@@ -14,7 +14,7 @@ const CSP = `
1414 child-src 'none';
1515 img-src https: data: file: socket:;
1616 "
17- >` ;
17+ >`
1818
1919function getPackageManager ( userAgent ) {
2020 if ( typeof userAgent !== 'string' ) return NPM
@@ -49,8 +49,6 @@ const viteProcess = spawn(viteCreateCommand, [], {
4949viteProcess . on ( 'close' , ( code ) => {
5050 const cwd = resolve ( process . cwd ( ) , projectName )
5151
52-
53-
5452 try {
5553 execSync ( 'ssc --version' , {
5654 stdio : 'ignore'
@@ -70,7 +68,7 @@ viteProcess.on('close', (code) => {
7068 if ( error . code === 'ENOENT' ) process . exit ( 0 )
7169 }
7270
73- process . stdout . write ( ` \nAdding the socket.ini file to the project\n` )
71+ process . stdout . write ( ' \nAdding the socket.ini file to the project\n' )
7472
7573 execSync ( `ssc init --name=${ projectName } ` , {
7674 cwd,
@@ -90,14 +88,14 @@ viteProcess.on('close', (code) => {
9088 '; script = "npm run build"' ,
9189 'script = "npm run build"'
9290 )
93- writeFileSync ( socketIniPath , modifiedSocketIni , 'utf8' ) ;
91+ writeFileSync ( socketIniPath , modifiedSocketIni , 'utf8' )
9492
9593 process . stdout . write ( '\nPatching index.html for the create-vite\n' )
9694
9795 const indexHTMLPath = resolve ( cwd , 'index.html' )
9896 const indexHTML = readFileSync ( indexHTMLPath , 'utf-8' )
99- const modifiedData = indexHTML . replace ( '<head>' , '<head>\n' + CSP + '\n' ) ;
100- writeFileSync ( indexHTMLPath , modifiedData , 'utf8' ) ;
97+ const modifiedData = indexHTML . replace ( '<head>' , '<head>\n' + CSP + '\n' )
98+ writeFileSync ( indexHTMLPath , modifiedData , 'utf8' )
10199
102100 process . stdout . write ( '\nPatching package.json\n' )
103101
@@ -107,7 +105,7 @@ viteProcess.on('close', (code) => {
107105 '"tsc && vite build"' ,
108106 '"tsc && vite build --"'
109107 )
110- writeFileSync ( packageJSONPath , modifiedPackageJSON , 'utf8' ) ;
108+ writeFileSync ( packageJSONPath , modifiedPackageJSON , 'utf8' )
111109
112110 process . stdout . write ( `\nDone!\n\nBuild and run your app with:\nssc build -r ${ projectName } ` )
113111} )
0 commit comments