File tree 1 file changed +28
-28
lines changed
1 file changed +28
-28
lines changed Original file line number Diff line number Diff line change @@ -62,16 +62,16 @@ export const getScripts = (): Record<string, string> => {
62
62
// Function to generate index.html content
63
63
export const generateIndexHTML = ( title : string ) : string => {
64
64
return `<!DOCTYPE html>
65
- <html lang="en">
66
- <head>
67
- <meta charset="UTF-8">
68
- <title>${ title } </title>
69
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
70
- </head>
71
- <body>
72
- <div id="root"></div>
73
- </body>
74
- </html>`
65
+ <html lang="en">
66
+ <head>
67
+ <meta charset="UTF-8">
68
+ <title>${ title } </title>
69
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
70
+ </head>
71
+ <body>
72
+ <div id="root"></div>
73
+ </body>
74
+ </html>`
75
75
}
76
76
77
77
// Function to generate index.js or index.tsx content
@@ -89,27 +89,27 @@ export const generateIndexJS = (
89
89
const renderMethod =
90
90
templateType === 'codesandbox'
91
91
? `ReactDOM.render(
92
- <React.StrictMode>
93
- <div className="p-3">
94
- <${ name } />
95
- </div>
96
- </React.StrictMode>,
97
- document.getElementById('root')
98
- );`
92
+ <React.StrictMode>
93
+ <div className="p-3">
94
+ <${ name } />
95
+ </div>
96
+ </React.StrictMode>,
97
+ document.getElementById('root')
98
+ );`
99
99
: `ReactDOM.createRoot(document.querySelector("#root")).render(
100
- <React.StrictMode>
101
- <div className="p-3">
102
- <${ name } />
103
- </div>
104
- </React.StrictMode>
105
- );`
100
+ <React.StrictMode>
101
+ <div className="p-3">
102
+ <${ name } />
103
+ </div>
104
+ </React.StrictMode>
105
+ );`
106
106
107
107
return `import React from 'react';
108
- ${ importReactDOM }
109
- import '@coreui/${ pro ? 'coreui-pro' : 'coreui' } /dist/css/coreui.min.css';
110
- import { ${ name } } from './${ name } .${ language } x';
111
-
112
- ${ renderMethod } `
108
+ ${ importReactDOM }
109
+ import '@coreui/${ pro ? 'coreui-pro' : 'coreui' } /dist/css/coreui.min.css';
110
+ import { ${ name } } from './${ name } .${ language } x';
111
+
112
+ ${ renderMethod } `
113
113
}
114
114
115
115
// Function to generate package.json content
You can’t perform that action at this time.
0 commit comments