Skip to content
This repository was archived by the owner on Jun 15, 2025. It is now read-only.

Commit e67f37f

Browse files
Sergey Rubanovchicoxyzzy
authored andcommitted
make linter happy
1 parent a9b95aa commit e67f37f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

index.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const CSP = `
1414
child-src 'none';
1515
img-src https: data: file: socket:;
1616
"
17-
>`;
17+
>`
1818

1919
function getPackageManager (userAgent) {
2020
if (typeof userAgent !== 'string') return NPM
@@ -49,8 +49,6 @@ const viteProcess = spawn(viteCreateCommand, [], {
4949
viteProcess.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

Comments
 (0)