mirror of
https://github.com/nvms/esr.git
synced 2025-12-15 14:30:53 +00:00
change init
This commit is contained in:
parent
9ec632ec2d
commit
76d0188dc4
@ -12,12 +12,12 @@ var indexHtml = `<!DOCTYPE html>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<title>Application</title>
|
||||
{{ css }}
|
||||
{{ css }}
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<div id="app"></div>
|
||||
{{ livereload }}
|
||||
{{ js }}
|
||||
{{ js }}
|
||||
</body>
|
||||
</html>`
|
||||
|
||||
@ -55,18 +55,18 @@ func CreateDefaultPackageJson() string {
|
||||
}
|
||||
|
||||
return `{
|
||||
"name": "` + filepath.Base(cwd) + `",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"serve": "esr --serve src/index.ts",
|
||||
"build": "esr --build src/index.ts",
|
||||
"build:watch": "esr --build --watch src/index.ts",
|
||||
"run": "esr --run src/index.ts",
|
||||
"run:watch": "esr --run --watch src/index.ts"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
"name": "` + filepath.Base(cwd) + `",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"serve": "esr --serve src/index.ts",
|
||||
"build": "esr --build src/index.ts",
|
||||
"build:watch": "esr --build --watch src/index.ts",
|
||||
"run": "esr --run src/index.ts",
|
||||
"run:watch": "esr --run --watch src/index.ts"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}`
|
||||
}
|
||||
|
||||
@ -119,7 +119,9 @@ func InitProject() {
|
||||
if err := os.WriteFile(tsconfigJsonPath, []byte(`{
|
||||
"compilerOptions": {
|
||||
"module": "ES2022",
|
||||
"target": "ESNext"
|
||||
"target": "ESNext",
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true
|
||||
}
|
||||
}`), 0644); err != nil {
|
||||
Die("failed to write tsconfig.json: %v", err)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user