create-zeus 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +40 -0
- package/templates/basic-ts/index.html +11 -0
- package/templates/basic-ts/package.json +20 -0
- package/templates/basic-ts/src/main.tsx +15 -0
- package/templates/basic-ts/tsconfig.json +13 -0
- package/templates/basic-ts/vite.config.ts +6 -0
- package/templates/web-component-ts/index.html +14 -0
- package/templates/web-component-ts/package.json +20 -0
- package/templates/web-component-ts/src/main.tsx +26 -0
- package/templates/web-component-ts/tsconfig.json +13 -0
- package/templates/web-component-ts/vite.config.ts +10 -0
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-zeus",
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"description": "Create a Zeus app",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"create-zeus": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"templates"
|
|
12
|
+
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/baicie/zeus",
|
|
16
|
+
"directory": "packages/devtools/create-zeus"
|
|
17
|
+
},
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/baicie/zeus/issues"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/baicie/zeus/tree/main/packages/devtools/create-zeus#readme",
|
|
22
|
+
"keywords": [
|
|
23
|
+
"zeus",
|
|
24
|
+
"scaffold"
|
|
25
|
+
],
|
|
26
|
+
"author": "Baicie",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@clack/prompts": "^1.5.1",
|
|
30
|
+
"picocolors": "^1.1.1"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"tsup": "^8.5.1",
|
|
34
|
+
"typescript": "^6.0.3"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsup src/index.ts --format esm --no-dts --clean --platform node --target node18",
|
|
38
|
+
"dev": "tsup src/index.ts --format esm --no-dts --watch --platform node --target node18"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "my-zeus-app",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"check": "tsc --noEmit"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@zeus-js/zeus": "workspace:*"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@zeus-js/vite-plugin": "workspace:*",
|
|
17
|
+
"typescript": "^6.0.3",
|
|
18
|
+
"vite": "^8.0.16"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { render, state } from '@zeus-js/zeus'
|
|
2
|
+
|
|
3
|
+
function App() {
|
|
4
|
+
const count = state(0)
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
<main>
|
|
8
|
+
<h1>Zeus</h1>
|
|
9
|
+
|
|
10
|
+
<button onClick={() => count.value++}>count: {count.value}</button>
|
|
11
|
+
</main>
|
|
12
|
+
)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
render(() => <App />, document.getElementById('root')!)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "Bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"jsx": "preserve",
|
|
8
|
+
"jsxImportSource": "@zeus-js/zeus",
|
|
9
|
+
"types": ["@zeus-js/zeus/jsx"],
|
|
10
|
+
"skipLibCheck": true
|
|
11
|
+
},
|
|
12
|
+
"include": ["src"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<title>Zeus Web Component</title>
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<z-counter title="Zeus Counter">
|
|
9
|
+
<p>Light DOM content</p>
|
|
10
|
+
</z-counter>
|
|
11
|
+
|
|
12
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "my-zeus-app",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"check": "tsc --noEmit"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@zeus-js/zeus": "workspace:*"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@zeus-js/vite-plugin": "workspace:*",
|
|
17
|
+
"typescript": "^6.0.3",
|
|
18
|
+
"vite": "^8.0.16"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Host, Slot, defineElement, state } from '@zeus-js/zeus'
|
|
2
|
+
|
|
3
|
+
defineElement(
|
|
4
|
+
'z-counter',
|
|
5
|
+
{
|
|
6
|
+
shadow: false,
|
|
7
|
+
props: {
|
|
8
|
+
title: String,
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
props => {
|
|
12
|
+
const count = state(0)
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Host>
|
|
16
|
+
<section>
|
|
17
|
+
<h2>{props.title}</h2>
|
|
18
|
+
|
|
19
|
+
<button onClick={() => count.value++}>count: {count.value}</button>
|
|
20
|
+
|
|
21
|
+
<Slot />
|
|
22
|
+
</section>
|
|
23
|
+
</Host>
|
|
24
|
+
)
|
|
25
|
+
},
|
|
26
|
+
)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "Bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"jsx": "preserve",
|
|
8
|
+
"jsxImportSource": "@zeus-js/zeus",
|
|
9
|
+
"types": ["@zeus-js/zeus/jsx"],
|
|
10
|
+
"skipLibCheck": true
|
|
11
|
+
},
|
|
12
|
+
"include": ["src"]
|
|
13
|
+
}
|