aiplang 2.4.0 → 2.4.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/README.md +6 -6
- package/bin/aiplang.js +1 -1
- package/package.json +1 -1
- package/runtime/aiplang-runtime.js +5 -5
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ cd my-app
|
|
|
8
8
|
npx aiplang serve
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Ask Claude to generate a page → paste into `pages/home.
|
|
11
|
+
Ask Claude to generate a page → paste into `pages/home.aiplang` → see it live.
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -16,9 +16,9 @@ Ask Claude to generate a page → paste into `pages/home.flux` → see it live.
|
|
|
16
16
|
|
|
17
17
|
**aiplang** is a web language designed to be generated by AI (Claude), not written by humans.
|
|
18
18
|
|
|
19
|
-
A single `.
|
|
19
|
+
A single `.aiplang` file describes a complete app: frontend, backend, database, auth, email, jobs.
|
|
20
20
|
|
|
21
|
-
```
|
|
21
|
+
```aiplang
|
|
22
22
|
~db sqlite ./app.db
|
|
23
23
|
~auth jwt $JWT_SECRET expire=7d
|
|
24
24
|
~admin /admin
|
|
@@ -83,7 +83,7 @@ npx aiplang init --template landing # landing page template
|
|
|
83
83
|
npx aiplang init --template crud # CRUD app template
|
|
84
84
|
npx aiplang serve # dev server + hot reload → localhost:3000
|
|
85
85
|
npx aiplang build pages/ --out dist/ # compile → static HTML
|
|
86
|
-
npx aiplang start app.
|
|
86
|
+
npx aiplang start app.aiplang # full-stack server (Node.js)
|
|
87
87
|
npx aiplang new dashboard # create new page template
|
|
88
88
|
```
|
|
89
89
|
|
|
@@ -111,13 +111,13 @@ All blocks accept: animate:fade-up class:my-class | raw{<html>} | foot{text>/pat
|
|
|
111
111
|
|
|
112
112
|
```
|
|
113
113
|
aiplang/
|
|
114
|
-
├── packages/
|
|
114
|
+
├── packages/aiplang-pkg/ ← npm package (aiplang CLI + runtime)
|
|
115
115
|
│ ├── bin/aiplang.js ← CLI: init, serve, build, new, start
|
|
116
116
|
│ ├── runtime/aiplang-hydrate.js← 10KB reactive runtime
|
|
117
117
|
│ ├── server/server.js ← full-stack Node.js server
|
|
118
118
|
│ └── aiplang-knowledge.md ← Claude Project knowledge file
|
|
119
119
|
├── aiplang-go/ ← Go compiler + server (v2)
|
|
120
|
-
│ ├── compiler/compiler.go ← .
|
|
120
|
+
│ ├── compiler/compiler.go ← .aiplang → AST parser
|
|
121
121
|
│ ├── server/server.go ← Go HTTP server
|
|
122
122
|
│ └── cmd/aiplangd/main.go ← binary entrypoint
|
|
123
123
|
├── docs/ ← GitHub Pages (aiplang.io)
|
package/bin/aiplang.js
CHANGED
|
@@ -5,7 +5,7 @@ const fs = require('fs')
|
|
|
5
5
|
const path = require('path')
|
|
6
6
|
const http = require('http')
|
|
7
7
|
|
|
8
|
-
const VERSION = '2.4.
|
|
8
|
+
const VERSION = '2.4.1'
|
|
9
9
|
const RUNTIME_DIR = path.join(__dirname, '..', 'runtime')
|
|
10
10
|
const cmd = process.argv[2]
|
|
11
11
|
const args = process.argv.slice(3)
|
package/package.json
CHANGED
|
@@ -456,7 +456,7 @@ class Renderer {
|
|
|
456
456
|
|
|
457
457
|
render(page) {
|
|
458
458
|
this.container.innerHTML = ''
|
|
459
|
-
this.container.className = `
|
|
459
|
+
this.container.className = `aiplang-root aiplang-theme-${page.theme}`
|
|
460
460
|
for (const block of page.blocks) {
|
|
461
461
|
const el = this.renderBlock(block)
|
|
462
462
|
if (el) this.container.appendChild(el)
|
|
@@ -1069,9 +1069,9 @@ input,button,select{font-family:inherit}
|
|
|
1069
1069
|
|
|
1070
1070
|
function boot(src, container) {
|
|
1071
1071
|
// Inject CSS once
|
|
1072
|
-
if (!document.getElementById('
|
|
1072
|
+
if (!document.getElementById('aiplang-css')) {
|
|
1073
1073
|
const style = document.createElement('style')
|
|
1074
|
-
style.id = '
|
|
1074
|
+
style.id = 'aiplang-css'
|
|
1075
1075
|
style.textContent = CSS
|
|
1076
1076
|
document.head.appendChild(style)
|
|
1077
1077
|
}
|
|
@@ -1089,9 +1089,9 @@ return { boot, parseFlux, State, Renderer, Router, QueryEngine }
|
|
|
1089
1089
|
|
|
1090
1090
|
})()
|
|
1091
1091
|
|
|
1092
|
-
// Auto-boot from <script type="text/
|
|
1092
|
+
// Auto-boot from <script type="text/aiplang">
|
|
1093
1093
|
document.addEventListener('DOMContentLoaded', () => {
|
|
1094
|
-
const script = document.querySelector('script[type="text/
|
|
1094
|
+
const script = document.querySelector('script[type="text/aiplang"]')
|
|
1095
1095
|
if (script) {
|
|
1096
1096
|
const targetSel = script.getAttribute('target') || '#app'
|
|
1097
1097
|
const container = document.querySelector(targetSel)
|