Skip to content

Commit 7bf4ddb

Browse files
authored
chore: template cleanup (#644)
1 parent 078540f commit 7bf4ddb

13 files changed

Lines changed: 55 additions & 55 deletions

File tree

packages/create-jitar/templates/react/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Vite + React + TS</title>
7+
<title>Vite + React + Jitar</title>
88
</head>
99
<body>
1010
<div id="root"></div>
1111
<script type="module" src="/src/webui/main.tsx"></script>
1212
</body>
13-
</html>
13+
</html>

packages/create-jitar/templates/react/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@
1111
"standalone": "jitar start --service=services/standalone.json"
1212
},
1313
"dependencies": {
14-
"jitar": "^0.9.0",
14+
"jitar": "^0.9.2",
1515
"react": "^19.1.0",
1616
"react-dom": "^19.1.0"
1717
},
1818
"devDependencies": {
19-
"@jitar/plugin-vite": "^0.9.0",
20-
"@types/react": "^19.1.4",
19+
"@jitar/plugin-vite": "^0.9.2",
20+
"@types/node": "22.15.27",
21+
"@types/react": "^19.1.6",
2122
"@types/react-dom": "^19.1.5",
22-
"@vitejs/plugin-react": "^4.3.1",
23-
"typescript": "^5.5.3",
23+
"@vitejs/plugin-react": "^4.5.0",
24+
"typescript": "^5.8.3",
2425
"vite": "^6.3.5"
2526
}
2627
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
12
export async function sayHello(name: string): Promise<string>
23
{
3-
return `Hello, ${name}!`
4-
}
4+
return `Hello, ${name}!`;
5+
}
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import { useEffect, useState } from 'react'
21

3-
import './App.css'
4-
import reactLogo from './assets/react.svg'
5-
import jitarLogo from './assets/jitar.svg'
2+
import { useEffect, useState } from 'react';
63

7-
import { sayHello } from '../domain/sayHello'
4+
import './App.css';
5+
import reactLogo from './assets/react.svg';
6+
import jitarLogo from './assets/jitar.svg';
87

9-
function App()
8+
import { sayHello } from '../domain/sayHello';
9+
10+
export default function App()
1011
{
1112
const [message, setMessage] = useState<string>('Loading...');
1213

@@ -19,18 +20,16 @@ function App()
1920

2021
return (
2122
<div className="App">
22-
<a href="https://vitejs.dev" target="_blank">
23+
<a href="https://vitejs.dev" target="_blank" rel="noopener noreferrer">
2324
<img src="/vite.svg" className="logo" alt="Vite logo" />
2425
</a>
25-
<a href="https://reactjs.org" target="_blank">
26+
<a href="https://reactjs.org" target="_blank" rel="noopener noreferrer">
2627
<img src={reactLogo} className="logo react" alt="React logo" />
2728
</a>
28-
<a href="https://jitar.dev" target="_blank">
29+
<a href="https://jitar.dev" target="_blank" rel="noopener noreferrer">
2930
<img src={jitarLogo} className="logo jitar" alt="Jitar logo" />
3031
</a>
3132
<h1>{message}</h1>
3233
</div>
3334
)
3435
}
35-
36-
export default App

packages/create-jitar/templates/react/src/webui/jitar.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
import React from 'react'
2-
import ReactDOM from 'react-dom/client'
3-
import App from './App'
4-
import './index.css'
1+
2+
import React from 'react';
3+
import ReactDOM from 'react-dom/client';
4+
5+
import App from './App';
6+
import './index.css';
57

68
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
79
<React.StrictMode>
810
<App />
911
</React.StrictMode>
10-
)
12+
);

packages/create-jitar/templates/react/vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
import { defineConfig } from 'vite';
23
import react from '@vitejs/plugin-react';
34
import jitar from '@jitar/plugin-vite';
@@ -10,4 +11,4 @@ export default defineConfig({
1011
react(),
1112
jitar({ sourceDir: 'src', targetDir: 'dist', jitarDir: 'domain', jitarUrl: 'http://localhost:3000', segments: [] })
1213
]
13-
})
14+
});

packages/create-jitar/templates/vue/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Vite + Vue + TS</title>
7+
<title>Vite + Vue + Jitar</title>
88
</head>
99
<body>
1010
<div id="app"></div>
1111
<script type="module" src="/src/webui/main.ts"></script>
1212
</body>
13-
</html>
13+
</html>

packages/create-jitar/templates/vue/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111
"standalone": "jitar start --service=services/standalone.json"
1212
},
1313
"dependencies": {
14-
"jitar": "^0.9.0",
15-
"vue": "^3.5.14"
14+
"jitar": "^0.9.2",
15+
"vue": "^3.5.16"
1616
},
1717
"devDependencies": {
18-
"@jitar/plugin-vite": "^0.9.0",
18+
"@types/node": "22.15.27",
19+
"@jitar/plugin-vite": "^0.9.2",
1920
"@vitejs/plugin-vue": "^5.2.4",
20-
"typescript": "^5.5.3",
21+
"typescript": "^5.8.3",
2122
"vite": "^6.3.5",
2223
"vue-tsc": "^2.2.10"
2324
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
12
export async function sayHello(name: string): Promise<string>
23
{
3-
return `Hello, ${name}!`
4-
}
4+
return `Hello, ${name}!`;
5+
}

0 commit comments

Comments
 (0)