@sigx/cli 0.1.0
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/LICENSE +21 -0
- package/README.md +78 -0
- package/dist/cli.js +230 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/create.d.ts +1 -0
- package/dist/commands/create.js +411 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/plugin.d.ts +26 -0
- package/dist/plugin.js +11 -0
- package/dist/plugin.js.map +1 -0
- package/dist/templates/basic/index.html +32 -0
- package/dist/templates/basic/package.json +19 -0
- package/dist/templates/basic/src/App.tsx +35 -0
- package/dist/templates/basic/tsconfig.json +13 -0
- package/dist/templates/basic/vite.config.ts +15 -0
- package/dist/templates/basic-daisyui/index.html +14 -0
- package/dist/templates/basic-daisyui/package.json +23 -0
- package/dist/templates/basic-daisyui/src/App.tsx +165 -0
- package/dist/templates/basic-daisyui/src/style.css +5 -0
- package/dist/templates/basic-daisyui/tsconfig.json +13 -0
- package/dist/templates/basic-daisyui/vite.config.ts +17 -0
- package/dist/templates/basic-tailwind/index.html +13 -0
- package/dist/templates/basic-tailwind/package.json +21 -0
- package/dist/templates/basic-tailwind/src/App.tsx +37 -0
- package/dist/templates/basic-tailwind/src/style.css +1 -0
- package/dist/templates/basic-tailwind/tsconfig.json +13 -0
- package/dist/templates/basic-tailwind/vite.config.ts +17 -0
- package/dist/templates/lynx/README.md +57 -0
- package/dist/templates/lynx/assets/adaptive-foreground.png +0 -0
- package/dist/templates/lynx/assets/icon.png +0 -0
- package/dist/templates/lynx/assets/splash.png +0 -0
- package/dist/templates/lynx/lynx.config.ts +17 -0
- package/dist/templates/lynx/package.json +28 -0
- package/dist/templates/lynx/sigx.lynx.config.ts +46 -0
- package/dist/templates/lynx/src/App.tsx +103 -0
- package/dist/templates/lynx/src/main.thread.tsx +2 -0
- package/dist/templates/lynx/src/main.tsx +8 -0
- package/dist/templates/lynx/tsconfig.json +19 -0
- package/dist/templates/lynx-tailwind/README.md +61 -0
- package/dist/templates/lynx-tailwind/assets/adaptive-foreground.png +0 -0
- package/dist/templates/lynx-tailwind/assets/icon.png +0 -0
- package/dist/templates/lynx-tailwind/assets/splash.png +0 -0
- package/dist/templates/lynx-tailwind/lynx.config.ts +20 -0
- package/dist/templates/lynx-tailwind/package.json +32 -0
- package/dist/templates/lynx-tailwind/postcss.config.js +5 -0
- package/dist/templates/lynx-tailwind/sigx.lynx.config.ts +44 -0
- package/dist/templates/lynx-tailwind/src/App.tsx +52 -0
- package/dist/templates/lynx-tailwind/src/main.thread.tsx +2 -0
- package/dist/templates/lynx-tailwind/src/main.tsx +9 -0
- package/dist/templates/lynx-tailwind/src/styles.css +3 -0
- package/dist/templates/lynx-tailwind/tailwind.config.ts +9 -0
- package/dist/templates/lynx-tailwind/tsconfig.json +19 -0
- package/dist/templates/ssg/index.html +25 -0
- package/dist/templates/ssg/package.json +22 -0
- package/dist/templates/ssg/src/layouts/default.tsx +27 -0
- package/dist/templates/ssg/src/pages/about.mdx +15 -0
- package/dist/templates/ssg/src/pages/index.mdx +37 -0
- package/dist/templates/ssg/ssg.config.ts +20 -0
- package/dist/templates/ssg/tsconfig.json +14 -0
- package/dist/templates/ssg/vite.config.ts +16 -0
- package/dist/templates/ssg-daisyui/index.html +13 -0
- package/dist/templates/ssg-daisyui/package.json +26 -0
- package/dist/templates/ssg-daisyui/src/layouts/default.tsx +39 -0
- package/dist/templates/ssg-daisyui/src/pages/about.mdx +17 -0
- package/dist/templates/ssg-daisyui/src/pages/index.mdx +34 -0
- package/dist/templates/ssg-daisyui/src/style.css +5 -0
- package/dist/templates/ssg-daisyui/ssg.config.ts +20 -0
- package/dist/templates/ssg-daisyui/tsconfig.json +14 -0
- package/dist/templates/ssg-daisyui/vite.config.ts +18 -0
- package/dist/templates/ssg-tailwind/index.html +12 -0
- package/dist/templates/ssg-tailwind/package.json +24 -0
- package/dist/templates/ssg-tailwind/src/layouts/default.tsx +29 -0
- package/dist/templates/ssg-tailwind/src/pages/about.mdx +16 -0
- package/dist/templates/ssg-tailwind/src/pages/index.mdx +37 -0
- package/dist/templates/ssg-tailwind/src/style.css +1 -0
- package/dist/templates/ssg-tailwind/ssg.config.ts +20 -0
- package/dist/templates/ssg-tailwind/tsconfig.json +14 -0
- package/dist/templates/ssg-tailwind/vite.config.ts +18 -0
- package/dist/templates/ssr/index.html +12 -0
- package/dist/templates/ssr/package.json +24 -0
- package/dist/templates/ssr/src/App.tsx +32 -0
- package/dist/templates/ssr/src/entry-client.tsx +25 -0
- package/dist/templates/ssr/src/entry-server.tsx +24 -0
- package/dist/templates/ssr/src/pages/About.tsx +20 -0
- package/dist/templates/ssr/src/pages/Home.tsx +31 -0
- package/dist/templates/ssr/src/router.ts +27 -0
- package/dist/templates/ssr/tsconfig.json +13 -0
- package/dist/templates/ssr/vite.config.ts +18 -0
- package/dist/templates/ssr-daisyui/index.html +14 -0
- package/dist/templates/ssr-daisyui/package.json +28 -0
- package/dist/templates/ssr-daisyui/src/App.tsx +55 -0
- package/dist/templates/ssr-daisyui/src/entry-client.tsx +25 -0
- package/dist/templates/ssr-daisyui/src/entry-server.tsx +24 -0
- package/dist/templates/ssr-daisyui/src/pages/About.tsx +104 -0
- package/dist/templates/ssr-daisyui/src/pages/Home.tsx +133 -0
- package/dist/templates/ssr-daisyui/src/router.ts +27 -0
- package/dist/templates/ssr-daisyui/src/style.css +5 -0
- package/dist/templates/ssr-daisyui/tsconfig.json +13 -0
- package/dist/templates/ssr-daisyui/vite.config.ts +20 -0
- package/dist/templates/ssr-tailwind/index.html +13 -0
- package/dist/templates/ssr-tailwind/package.json +26 -0
- package/dist/templates/ssr-tailwind/src/App.tsx +32 -0
- package/dist/templates/ssr-tailwind/src/entry-client.tsx +25 -0
- package/dist/templates/ssr-tailwind/src/entry-server.tsx +24 -0
- package/dist/templates/ssr-tailwind/src/pages/About.tsx +21 -0
- package/dist/templates/ssr-tailwind/src/pages/Home.tsx +31 -0
- package/dist/templates/ssr-tailwind/src/router.ts +27 -0
- package/dist/templates/ssr-tailwind/src/style.css +1 -0
- package/dist/templates/ssr-tailwind/tsconfig.json +13 -0
- package/dist/templates/ssr-tailwind/vite.config.ts +20 -0
- package/package.json +65 -0
- package/templates/basic/index.html +32 -0
- package/templates/basic/package.json +19 -0
- package/templates/basic/src/App.tsx +35 -0
- package/templates/basic/tsconfig.json +13 -0
- package/templates/basic/vite.config.ts +15 -0
- package/templates/basic-daisyui/index.html +14 -0
- package/templates/basic-daisyui/package.json +23 -0
- package/templates/basic-daisyui/src/App.tsx +165 -0
- package/templates/basic-daisyui/src/style.css +5 -0
- package/templates/basic-daisyui/tsconfig.json +13 -0
- package/templates/basic-daisyui/vite.config.ts +17 -0
- package/templates/basic-tailwind/index.html +13 -0
- package/templates/basic-tailwind/package.json +21 -0
- package/templates/basic-tailwind/src/App.tsx +37 -0
- package/templates/basic-tailwind/src/style.css +1 -0
- package/templates/basic-tailwind/tsconfig.json +13 -0
- package/templates/basic-tailwind/vite.config.ts +17 -0
- package/templates/lynx/README.md +57 -0
- package/templates/lynx/assets/adaptive-foreground.png +0 -0
- package/templates/lynx/assets/icon.png +0 -0
- package/templates/lynx/assets/splash.png +0 -0
- package/templates/lynx/lynx.config.ts +17 -0
- package/templates/lynx/package.json +28 -0
- package/templates/lynx/sigx.lynx.config.ts +46 -0
- package/templates/lynx/src/App.tsx +103 -0
- package/templates/lynx/src/main.thread.tsx +2 -0
- package/templates/lynx/src/main.tsx +8 -0
- package/templates/lynx/tsconfig.json +19 -0
- package/templates/lynx-tailwind/README.md +61 -0
- package/templates/lynx-tailwind/assets/adaptive-foreground.png +0 -0
- package/templates/lynx-tailwind/assets/icon.png +0 -0
- package/templates/lynx-tailwind/assets/splash.png +0 -0
- package/templates/lynx-tailwind/lynx.config.ts +20 -0
- package/templates/lynx-tailwind/package.json +32 -0
- package/templates/lynx-tailwind/postcss.config.js +5 -0
- package/templates/lynx-tailwind/sigx.lynx.config.ts +44 -0
- package/templates/lynx-tailwind/src/App.tsx +52 -0
- package/templates/lynx-tailwind/src/main.thread.tsx +2 -0
- package/templates/lynx-tailwind/src/main.tsx +9 -0
- package/templates/lynx-tailwind/src/styles.css +3 -0
- package/templates/lynx-tailwind/tailwind.config.ts +9 -0
- package/templates/lynx-tailwind/tsconfig.json +19 -0
- package/templates/ssg/index.html +25 -0
- package/templates/ssg/package.json +22 -0
- package/templates/ssg/src/layouts/default.tsx +27 -0
- package/templates/ssg/src/pages/about.mdx +15 -0
- package/templates/ssg/src/pages/index.mdx +37 -0
- package/templates/ssg/ssg.config.ts +20 -0
- package/templates/ssg/tsconfig.json +14 -0
- package/templates/ssg/vite.config.ts +16 -0
- package/templates/ssg-daisyui/index.html +13 -0
- package/templates/ssg-daisyui/package.json +26 -0
- package/templates/ssg-daisyui/src/layouts/default.tsx +39 -0
- package/templates/ssg-daisyui/src/pages/about.mdx +17 -0
- package/templates/ssg-daisyui/src/pages/index.mdx +34 -0
- package/templates/ssg-daisyui/src/style.css +5 -0
- package/templates/ssg-daisyui/ssg.config.ts +20 -0
- package/templates/ssg-daisyui/tsconfig.json +14 -0
- package/templates/ssg-daisyui/vite.config.ts +18 -0
- package/templates/ssg-tailwind/index.html +12 -0
- package/templates/ssg-tailwind/package.json +24 -0
- package/templates/ssg-tailwind/src/layouts/default.tsx +29 -0
- package/templates/ssg-tailwind/src/pages/about.mdx +16 -0
- package/templates/ssg-tailwind/src/pages/index.mdx +37 -0
- package/templates/ssg-tailwind/src/style.css +1 -0
- package/templates/ssg-tailwind/ssg.config.ts +20 -0
- package/templates/ssg-tailwind/tsconfig.json +14 -0
- package/templates/ssg-tailwind/vite.config.ts +18 -0
- package/templates/ssr/index.html +12 -0
- package/templates/ssr/package.json +24 -0
- package/templates/ssr/src/App.tsx +32 -0
- package/templates/ssr/src/entry-client.tsx +25 -0
- package/templates/ssr/src/entry-server.tsx +24 -0
- package/templates/ssr/src/pages/About.tsx +20 -0
- package/templates/ssr/src/pages/Home.tsx +31 -0
- package/templates/ssr/src/router.ts +27 -0
- package/templates/ssr/tsconfig.json +13 -0
- package/templates/ssr/vite.config.ts +18 -0
- package/templates/ssr-daisyui/index.html +14 -0
- package/templates/ssr-daisyui/package.json +28 -0
- package/templates/ssr-daisyui/src/App.tsx +55 -0
- package/templates/ssr-daisyui/src/entry-client.tsx +25 -0
- package/templates/ssr-daisyui/src/entry-server.tsx +24 -0
- package/templates/ssr-daisyui/src/pages/About.tsx +104 -0
- package/templates/ssr-daisyui/src/pages/Home.tsx +133 -0
- package/templates/ssr-daisyui/src/router.ts +27 -0
- package/templates/ssr-daisyui/src/style.css +5 -0
- package/templates/ssr-daisyui/tsconfig.json +13 -0
- package/templates/ssr-daisyui/vite.config.ts +20 -0
- package/templates/ssr-tailwind/index.html +13 -0
- package/templates/ssr-tailwind/package.json +26 -0
- package/templates/ssr-tailwind/src/App.tsx +32 -0
- package/templates/ssr-tailwind/src/entry-client.tsx +25 -0
- package/templates/ssr-tailwind/src/entry-server.tsx +24 -0
- package/templates/ssr-tailwind/src/pages/About.tsx +21 -0
- package/templates/ssr-tailwind/src/pages/Home.tsx +31 -0
- package/templates/ssr-tailwind/src/router.ts +27 -0
- package/templates/ssr-tailwind/src/style.css +1 -0
- package/templates/ssr-tailwind/tsconfig.json +13 -0
- package/templates/ssr-tailwind/vite.config.ts +20 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# {{projectName}}
|
|
2
|
+
|
|
3
|
+
A native mobile app built with [sigx-lynx](https://github.com/signalxjs/core) and Tailwind CSS.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
- Node.js 18+
|
|
10
|
+
- pnpm (recommended) or npm
|
|
11
|
+
- [sigx-lynx-go](https://github.com/signalxjs/core/tree/main/go) app on your device/emulator
|
|
12
|
+
|
|
13
|
+
### Development
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Install dependencies
|
|
17
|
+
pnpm install
|
|
18
|
+
|
|
19
|
+
# Start the dev server
|
|
20
|
+
sigx dev
|
|
21
|
+
|
|
22
|
+
# Or use npx
|
|
23
|
+
npx sigx dev
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Scan the QR code shown in the terminal with sigx-lynx-go, or enter the URL manually.
|
|
27
|
+
|
|
28
|
+
### Building
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
sigx build
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Environment Check
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
sigx doctor
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Project Structure
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
{{projectName}}/
|
|
44
|
+
├── src/
|
|
45
|
+
│ ├── App.tsx # Root component
|
|
46
|
+
│ ├── styles.css # Tailwind entry point
|
|
47
|
+
│ ├── main.tsx # BG-thread entry point
|
|
48
|
+
│ └── main.thread.tsx # Main-thread entry point
|
|
49
|
+
├── lynx.config.ts # rspeedy build config
|
|
50
|
+
├── sigx.lynx.config.ts # sigx-lynx native config
|
|
51
|
+
├── tailwind.config.ts # Tailwind CSS config
|
|
52
|
+
├── postcss.config.js # PostCSS config
|
|
53
|
+
├── tsconfig.json
|
|
54
|
+
└── package.json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Learn More
|
|
58
|
+
|
|
59
|
+
- [sigx-lynx Documentation](https://github.com/signalxjs/core)
|
|
60
|
+
- [Lynx Runtime](https://lynxjs.org)
|
|
61
|
+
- [Tailwind CSS](https://tailwindcss.com)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineConfig } from '@lynx-js/rspeedy';
|
|
2
|
+
import { pluginSigxLynx } from '@sigx/lynx-plugin';
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
source: {
|
|
6
|
+
entry: {
|
|
7
|
+
main: './src/main.tsx',
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
server: {
|
|
11
|
+
host: '0.0.0.0',
|
|
12
|
+
port: 3000,
|
|
13
|
+
},
|
|
14
|
+
plugins: [
|
|
15
|
+
pluginSigxLynx({
|
|
16
|
+
enableCSSInheritance: true,
|
|
17
|
+
enableCSSInlineVariables: true,
|
|
18
|
+
}),
|
|
19
|
+
],
|
|
20
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "sigx dev",
|
|
8
|
+
"build": "sigx build",
|
|
9
|
+
"doctor": "sigx doctor",
|
|
10
|
+
"prebuild": "sigx prebuild"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@sigx/lynx": "^0.1.0",
|
|
14
|
+
"@sigx/lynx-runtime-main": "^0.1.0",
|
|
15
|
+
"@sigx/lynx-core": "^0.1.0"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@sigx/cli": "^0.1.0",
|
|
19
|
+
"@sigx/lynx-cli": "^0.1.0",
|
|
20
|
+
"@sigx/lynx-plugin": "^0.1.0",
|
|
21
|
+
"@lynx-js/rspeedy": ">=0.1.0",
|
|
22
|
+
"@lynx-js/css-extract-webpack-plugin": ">=0.1.0",
|
|
23
|
+
"@lynx-js/template-webpack-plugin": ">=0.1.0",
|
|
24
|
+
"@lynx-js/runtime-wrapper-webpack-plugin": ">=0.1.0",
|
|
25
|
+
"@lynx-js/webpack-dev-transport": ">=0.1.0",
|
|
26
|
+
"@lynx-js/tailwind-preset": "^0.4.0",
|
|
27
|
+
"tailwindcss": "^3.4.0",
|
|
28
|
+
"postcss": "^8.4.0",
|
|
29
|
+
"autoprefixer": "^10.4.0",
|
|
30
|
+
"typescript": "^5.9.3"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { defineLynxConfig } from '@sigx/lynx-cli/config';
|
|
2
|
+
|
|
3
|
+
export default defineLynxConfig({
|
|
4
|
+
name: '{{projectName}}',
|
|
5
|
+
version: '0.1.0',
|
|
6
|
+
buildNumber: '1',
|
|
7
|
+
|
|
8
|
+
// App-shell assets — sigx ships sensible defaults in ./assets/.
|
|
9
|
+
// Swap these PNGs to rebrand without touching native code.
|
|
10
|
+
icon: 'assets/icon.png',
|
|
11
|
+
splash: {
|
|
12
|
+
image: 'assets/splash.png',
|
|
13
|
+
backgroundColor: '#FFFFFF',
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
// Custom URL scheme for deep linking ({{projectName}}://...).
|
|
17
|
+
// Comment out if you don't need deep links.
|
|
18
|
+
scheme: '{{projectName}}',
|
|
19
|
+
|
|
20
|
+
// 'portrait' | 'landscape' | 'default'
|
|
21
|
+
orientation: 'portrait',
|
|
22
|
+
|
|
23
|
+
modules: [
|
|
24
|
+
'@sigx/lynx-storage',
|
|
25
|
+
'@sigx/lynx-clipboard',
|
|
26
|
+
'@sigx/lynx-haptics',
|
|
27
|
+
'@sigx/lynx-device-info',
|
|
28
|
+
'@sigx/lynx-network',
|
|
29
|
+
],
|
|
30
|
+
android: {
|
|
31
|
+
applicationId: 'com.example.{{projectName}}',
|
|
32
|
+
versionCode: 1,
|
|
33
|
+
minSdk: 24,
|
|
34
|
+
targetSdk: 35,
|
|
35
|
+
adaptiveIcon: {
|
|
36
|
+
foreground: 'assets/adaptive-foreground.png',
|
|
37
|
+
backgroundColor: '#0D9488',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
ios: {
|
|
41
|
+
bundleIdentifier: 'com.example.{{projectName}}',
|
|
42
|
+
deploymentTarget: '15.0',
|
|
43
|
+
},
|
|
44
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { signal, component } from '@sigx/lynx';
|
|
2
|
+
|
|
3
|
+
const App = component(() => {
|
|
4
|
+
const count = signal(0);
|
|
5
|
+
|
|
6
|
+
return () => (
|
|
7
|
+
<scroll-view scroll-orientation="vertical" class="h-screen">
|
|
8
|
+
<view class="flex items-center justify-center h-screen gap-5 bg-slate-900">
|
|
9
|
+
{/* Logo */}
|
|
10
|
+
<view class="w-20 h-20 rounded-2xl bg-blue-500 flex items-center justify-center">
|
|
11
|
+
<text class="text-4xl text-white">⚡</text>
|
|
12
|
+
</view>
|
|
13
|
+
|
|
14
|
+
<text class="text-3xl font-bold text-slate-100">
|
|
15
|
+
{{projectName}}
|
|
16
|
+
</text>
|
|
17
|
+
|
|
18
|
+
<text class="text-sm text-slate-400 text-center max-w-[280px]">
|
|
19
|
+
Built with sigx-lynx + Tailwind CSS
|
|
20
|
+
</text>
|
|
21
|
+
|
|
22
|
+
{/* Counter card */}
|
|
23
|
+
<view class="mt-5 p-6 bg-slate-800 rounded-2xl items-center gap-4 w-[280px]">
|
|
24
|
+
<text class="text-5xl font-bold text-slate-200">
|
|
25
|
+
{count.value}
|
|
26
|
+
</text>
|
|
27
|
+
|
|
28
|
+
<view class="flex flex-row gap-3">
|
|
29
|
+
<view
|
|
30
|
+
bindtap={() => count.value > 0 && count.value--}
|
|
31
|
+
class="px-6 py-3 bg-slate-700 rounded-xl"
|
|
32
|
+
>
|
|
33
|
+
<text class="text-slate-200 text-lg">−</text>
|
|
34
|
+
</view>
|
|
35
|
+
<view
|
|
36
|
+
bindtap={() => count.value++}
|
|
37
|
+
class="px-6 py-3 bg-blue-500 rounded-xl"
|
|
38
|
+
>
|
|
39
|
+
<text class="text-white text-lg">+</text>
|
|
40
|
+
</view>
|
|
41
|
+
</view>
|
|
42
|
+
</view>
|
|
43
|
+
|
|
44
|
+
<text class="text-xs text-slate-600 mt-4">
|
|
45
|
+
Edit src/App.tsx to get started
|
|
46
|
+
</text>
|
|
47
|
+
</view>
|
|
48
|
+
</scroll-view>
|
|
49
|
+
);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export default App;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"jsx": "react-jsx",
|
|
14
|
+
"jsxImportSource": "@sigx/lynx",
|
|
15
|
+
"types": []
|
|
16
|
+
},
|
|
17
|
+
"include": ["src/**/*.ts", "src/**/*.tsx"],
|
|
18
|
+
"exclude": ["node_modules", "dist"]
|
|
19
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>{{projectName}}</title>
|
|
7
|
+
<style>
|
|
8
|
+
* {
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
body {
|
|
15
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
16
|
+
line-height: 1.6;
|
|
17
|
+
color: #333;
|
|
18
|
+
background: #f5f5f5;
|
|
19
|
+
}
|
|
20
|
+
</style>
|
|
21
|
+
</head>
|
|
22
|
+
<body>
|
|
23
|
+
<div id="app"><!--app-html--></div>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "ssg dev",
|
|
8
|
+
"build": "ssg build",
|
|
9
|
+
"preview": "ssg preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"sigx": "^0.4.1",
|
|
13
|
+
"@sigx/ssg": "^0.3.2",
|
|
14
|
+
"@sigx/router": "^0.3.2",
|
|
15
|
+
"@sigx/server-renderer": "^0.4.1"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@sigx/vite": "^0.4.1",
|
|
19
|
+
"vite": "^8.0.3",
|
|
20
|
+
"typescript": "^5.9.3"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { component } from 'sigx';
|
|
2
|
+
import type { LayoutProps, LayoutSlots } from '@sigx/ssg';
|
|
3
|
+
import { Link } from '@sigx/router';
|
|
4
|
+
|
|
5
|
+
export default component<LayoutProps, unknown, LayoutSlots>(({ slots }) => {
|
|
6
|
+
return () => (
|
|
7
|
+
<div style="min-height: 100vh; display: flex; flex-direction: column;">
|
|
8
|
+
<header style="background: #2c3e50; color: white; padding: 1rem;">
|
|
9
|
+
<div style="max-width: 800px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;">
|
|
10
|
+
<h1 style="margin: 0; font-size: 1.5rem;">🚀 {{projectName}}</h1>
|
|
11
|
+
<nav style="display: flex; gap: 1rem;">
|
|
12
|
+
<Link to="/" style="color: white; text-decoration: none;">Home</Link>
|
|
13
|
+
<Link to="/about" style="color: white; text-decoration: none;">About</Link>
|
|
14
|
+
</nav>
|
|
15
|
+
</div>
|
|
16
|
+
</header>
|
|
17
|
+
|
|
18
|
+
<main style="flex: 1; max-width: 800px; margin: 0 auto; padding: 2rem; width: 100%;">
|
|
19
|
+
{slots.default()}
|
|
20
|
+
</main>
|
|
21
|
+
|
|
22
|
+
<footer style="background: #2c3e50; color: #ccc; padding: 1rem; text-align: center; font-size: 0.875rem;">
|
|
23
|
+
Built with SignalX SSG
|
|
24
|
+
</footer>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: About
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# About
|
|
6
|
+
|
|
7
|
+
This is a SignalX static site generated with **@sigx/ssg**.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- 📄 File-based routing
|
|
12
|
+
- ✍️ MDX support (Markdown + JSX)
|
|
13
|
+
- 🎨 Syntax highlighting with Shiki
|
|
14
|
+
- ⚡ Island architecture with selective hydration
|
|
15
|
+
- 🏗️ Static site generation for optimal performance
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Home
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
import { component } from 'sigx';
|
|
6
|
+
|
|
7
|
+
export const Counter = component(({ signal }) => {
|
|
8
|
+
const state = signal({ count: 0 });
|
|
9
|
+
|
|
10
|
+
return () => (
|
|
11
|
+
<div style="background: white; padding: 24px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); text-align: center; margin-top: 24px;">
|
|
12
|
+
<p style="font-size: 48px; margin-bottom: 16px;">{state.count}</p>
|
|
13
|
+
<div style="display: flex; gap: 8px; justify-content: center;">
|
|
14
|
+
<button
|
|
15
|
+
onClick={() => state.count++}
|
|
16
|
+
style="padding: 10px 20px; background: #3498db; color: white; border: none; border-radius: 6px; cursor: pointer;"
|
|
17
|
+
>
|
|
18
|
+
Increment
|
|
19
|
+
</button>
|
|
20
|
+
<button
|
|
21
|
+
onClick={() => state.count--}
|
|
22
|
+
style="padding: 10px 20px; background: #e74c3c; color: white; border: none; border-radius: 6px; cursor: pointer;"
|
|
23
|
+
>
|
|
24
|
+
Decrement
|
|
25
|
+
</button>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
# Welcome to {{projectName}}
|
|
32
|
+
|
|
33
|
+
This is a **SignalX SSG** site with file-based routing and MDX support.
|
|
34
|
+
|
|
35
|
+
Edit `src/pages/index.mdx` to get started.
|
|
36
|
+
|
|
37
|
+
<Counter client:load />
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineSSGConfig } from '@sigx/ssg';
|
|
2
|
+
|
|
3
|
+
export default defineSSGConfig({
|
|
4
|
+
pages: 'src/pages',
|
|
5
|
+
layouts: 'src/layouts',
|
|
6
|
+
outDir: 'dist',
|
|
7
|
+
|
|
8
|
+
site: {
|
|
9
|
+
title: '{{projectName}}',
|
|
10
|
+
description: 'A SignalX static site',
|
|
11
|
+
url: 'https://example.com',
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
markdown: {
|
|
15
|
+
shiki: {
|
|
16
|
+
light: 'github-light',
|
|
17
|
+
dark: 'github-dark',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"jsx": "react-jsx",
|
|
5
|
+
"jsxImportSource": "sigx",
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"moduleResolution": "bundler",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"types": ["vite/client", "@sigx/ssg/virtual"]
|
|
12
|
+
},
|
|
13
|
+
"include": ["src/**/*.ts", "src/**/*.tsx"]
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import { sigxPlugin } from '@sigx/vite';
|
|
3
|
+
import { ssgPlugin } from '@sigx/ssg/vite';
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [
|
|
7
|
+
sigxPlugin(),
|
|
8
|
+
ssgPlugin()
|
|
9
|
+
],
|
|
10
|
+
oxc: {
|
|
11
|
+
jsx: {
|
|
12
|
+
runtime: 'automatic',
|
|
13
|
+
importSource: 'sigx'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en" data-theme="light">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>{{projectName}}</title>
|
|
7
|
+
<link rel="stylesheet" href="/src/style.css" />
|
|
8
|
+
<script>(function(){try{var t=localStorage.getItem('daisy-theme');if(!t&&window.matchMedia('(prefers-color-scheme:dark)').matches)t='dark';if(t)document.documentElement.setAttribute('data-theme',t);}catch(e){}})()</script>
|
|
9
|
+
</head>
|
|
10
|
+
<body class="bg-base-200 min-h-screen">
|
|
11
|
+
<div id="app"><!--app-html--></div>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "ssg dev",
|
|
8
|
+
"build": "ssg build",
|
|
9
|
+
"preview": "ssg preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"sigx": "^0.4.1",
|
|
13
|
+
"@sigx/ssg": "^0.3.2",
|
|
14
|
+
"@sigx/router": "^0.3.2",
|
|
15
|
+
"@sigx/server-renderer": "^0.4.1",
|
|
16
|
+
"@sigx/daisyui": "^0.3.2"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@sigx/vite": "^0.4.1",
|
|
20
|
+
"vite": "^8.0.3",
|
|
21
|
+
"typescript": "^5.9.3",
|
|
22
|
+
"tailwindcss": "^4.1.0",
|
|
23
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
24
|
+
"daisyui": "^5.0.0"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { component, onMounted } from 'sigx';
|
|
2
|
+
import type { LayoutProps, LayoutSlots } from '@sigx/ssg';
|
|
3
|
+
import { Link } from '@sigx/router';
|
|
4
|
+
import { ThemeProvider, ThemeSelector, initializeTheme } from '@sigx/daisyui';
|
|
5
|
+
|
|
6
|
+
export default component<LayoutProps, unknown, LayoutSlots>(({ slots }) => {
|
|
7
|
+
onMounted(() => {
|
|
8
|
+
initializeTheme({ defaultTheme: 'light' });
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
return () => (
|
|
12
|
+
<ThemeProvider defaultTheme="light" darkMode>
|
|
13
|
+
<div class="min-h-screen flex flex-col bg-base-100">
|
|
14
|
+
<header class="navbar bg-base-300">
|
|
15
|
+
<div class="flex-1">
|
|
16
|
+
<span class="text-xl font-bold px-4">🚀 {{projectName}}</span>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="flex-none">
|
|
19
|
+
<nav class="flex gap-2 mr-4">
|
|
20
|
+
<Link to="/" class="btn btn-sm btn-ghost">Home</Link>
|
|
21
|
+
<Link to="/about" class="btn btn-sm btn-ghost">About</Link>
|
|
22
|
+
</nav>
|
|
23
|
+
<ThemeSelector themes={['light', 'dark', 'cupcake', 'cyberpunk', 'synthwave', 'retro', 'custom']} />
|
|
24
|
+
</div>
|
|
25
|
+
</header>
|
|
26
|
+
|
|
27
|
+
<main class="flex-1 max-w-4xl mx-auto w-full px-6 py-12">
|
|
28
|
+
<article class="prose prose-lg max-w-none">
|
|
29
|
+
{slots.default()}
|
|
30
|
+
</article>
|
|
31
|
+
</main>
|
|
32
|
+
|
|
33
|
+
<footer class="footer footer-center p-4 bg-base-300 text-base-content">
|
|
34
|
+
<p>Built with SignalX SSG + DaisyUI</p>
|
|
35
|
+
</footer>
|
|
36
|
+
</div>
|
|
37
|
+
</ThemeProvider>
|
|
38
|
+
);
|
|
39
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: About
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# About
|
|
6
|
+
|
|
7
|
+
This is a SignalX static site generated with **@sigx/ssg** and styled with **DaisyUI**.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- 📄 File-based routing
|
|
12
|
+
- ✍️ MDX support (Markdown + JSX)
|
|
13
|
+
- 🎨 Syntax highlighting with Shiki
|
|
14
|
+
- ⚡ Island architecture with selective hydration
|
|
15
|
+
- 🌸 DaisyUI component library with theme switching
|
|
16
|
+
- 🎨 Custom theme support via `tailwind.config.js`
|
|
17
|
+
- 🏗️ Static site generation for optimal performance
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Home
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
import { component } from 'sigx';
|
|
6
|
+
import { Button, Card } from '@sigx/daisyui';
|
|
7
|
+
|
|
8
|
+
export const Counter = component(({ signal }) => {
|
|
9
|
+
const state = signal({ count: 0 });
|
|
10
|
+
|
|
11
|
+
return () => (
|
|
12
|
+
<Card shadow="lg" class="mt-8">
|
|
13
|
+
<Card.Body center>
|
|
14
|
+
<p class="text-6xl font-bold mb-6">{state.count}</p>
|
|
15
|
+
<Card.Actions justify="center">
|
|
16
|
+
<Button variant="primary" size="lg" onClick={() => state.count++}>
|
|
17
|
+
Increment
|
|
18
|
+
</Button>
|
|
19
|
+
<Button variant="error" size="lg" onClick={() => state.count--}>
|
|
20
|
+
Decrement
|
|
21
|
+
</Button>
|
|
22
|
+
</Card.Actions>
|
|
23
|
+
</Card.Body>
|
|
24
|
+
</Card>
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
# Welcome to {{projectName}}
|
|
29
|
+
|
|
30
|
+
This is a **SignalX SSG** site with file-based routing, MDX support, and DaisyUI components.
|
|
31
|
+
|
|
32
|
+
Edit `src/pages/index.mdx` to get started.
|
|
33
|
+
|
|
34
|
+
<Counter client:load />
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineSSGConfig } from '@sigx/ssg';
|
|
2
|
+
|
|
3
|
+
export default defineSSGConfig({
|
|
4
|
+
pages: 'src/pages',
|
|
5
|
+
layouts: 'src/layouts',
|
|
6
|
+
outDir: 'dist',
|
|
7
|
+
|
|
8
|
+
site: {
|
|
9
|
+
title: '{{projectName}}',
|
|
10
|
+
description: 'A SignalX static site',
|
|
11
|
+
url: 'https://example.com',
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
markdown: {
|
|
15
|
+
shiki: {
|
|
16
|
+
light: 'github-light',
|
|
17
|
+
dark: 'github-dark',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"jsx": "react-jsx",
|
|
5
|
+
"jsxImportSource": "sigx",
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"moduleResolution": "bundler",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"types": ["vite/client", "@sigx/ssg/virtual"]
|
|
12
|
+
},
|
|
13
|
+
"include": ["src/**/*.ts", "src/**/*.tsx"]
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import { sigxPlugin } from '@sigx/vite';
|
|
3
|
+
import { ssgPlugin } from '@sigx/ssg/vite';
|
|
4
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [
|
|
8
|
+
tailwindcss(),
|
|
9
|
+
sigxPlugin(),
|
|
10
|
+
ssgPlugin()
|
|
11
|
+
],
|
|
12
|
+
oxc: {
|
|
13
|
+
jsx: {
|
|
14
|
+
runtime: 'automatic',
|
|
15
|
+
importSource: 'sigx'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|