mirror of
https://github.com/nvms/esr.git
synced 2025-12-15 22:40:52 +00:00
change init
This commit is contained in:
parent
7dc00f2803
commit
e717902414
@ -44,8 +44,8 @@ run:
|
|||||||
runtime: bun
|
runtime: bun
|
||||||
sourcemap: false
|
sourcemap: false
|
||||||
|
|
||||||
jsx: transform
|
jsx: automatic
|
||||||
jsxFactory: h
|
jsxFactory: React.createElement
|
||||||
`
|
`
|
||||||
|
|
||||||
func CreateDefaultPackageJson() string {
|
func CreateDefaultPackageJson() string {
|
||||||
@ -117,10 +117,10 @@ func InitProject() {
|
|||||||
|
|
||||||
tsconfigJsonPath := filepath.Join(cwd, "tsconfig.json")
|
tsconfigJsonPath := filepath.Join(cwd, "tsconfig.json")
|
||||||
if err := os.WriteFile(tsconfigJsonPath, []byte(`{
|
if err := os.WriteFile(tsconfigJsonPath, []byte(`{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"jsx": "preserve",
|
"module": "ES2022",
|
||||||
"jsxFactory": "h"
|
"target": "ESNext"
|
||||||
}
|
}
|
||||||
}`), 0644); err != nil {
|
}`), 0644); err != nil {
|
||||||
Die("failed to write tsconfig.json: %v", err)
|
Die("failed to write tsconfig.json: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user