create-apexjs 0.6.3 → 0.6.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-apexjs",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "Scaffold a new Apex JS app",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -56,13 +56,15 @@ tests/*.test.ts Vitest. createTestApp boots the whole app in-process.
56
56
  ```
57
57
 
58
58
  ## The `.alpine` single-file component
59
+ `.alpine` is **TypeScript-only** — `<script>` blocks are always TS; `lang` is optional
60
+ (a `lang="js"` is a parse error).
59
61
  ```alpine
60
- <script server lang="ts">
62
+ <script server>
61
63
  // Runs on the server. loader() data becomes the page's x-data (real HTML first).
62
64
  export function loader() { return { title: 'Hello' } }
63
65
  export function head() { return { title: 'Hello' } } // SEO
64
66
  </script>
65
- <script client lang="ts">
67
+ <script client>
66
68
  // Optional client-only logic; import composables here.
67
69
  </script>
68
70
  <template x-data>
@@ -1,4 +1,4 @@
1
- <script server lang="ts">
1
+ <script server>
2
2
  export function loader() {
3
3
  return {}
4
4
  }
@@ -1,4 +1,4 @@
1
- <script server lang="ts">
1
+ <script server>
2
2
  import { PostService } from '../../services/PostService'
3
3
 
4
4
  const posts = new PostService()
@@ -1,4 +1,4 @@
1
- <script server lang="ts">
1
+ <script server>
2
2
  import { PostService } from '../../services/PostService'
3
3
 
4
4
  const posts = new PostService()
@@ -1,4 +1,4 @@
1
- <script server lang="ts">
1
+ <script server>
2
2
  import { PostService } from '../services/PostService'
3
3
 
4
4
  const posts = new PostService()
@@ -1,4 +1,4 @@
1
- <script server lang="ts">
1
+ <script server>
2
2
  // The user resolved by server/auth.ts is seeded into locals — so the page
3
3
  // renders the signed-in state on the SERVER, no flash of "logged out".
4
4
  export function loader({ locals }: { locals: Record<string, unknown> }) {
@@ -1,4 +1,4 @@
1
- <script server lang="ts">
1
+ <script server>
2
2
  import { handle } from '../db/index.js'
3
3
 
4
4
  // Runs on the server: reads straight from the database, so the message list is
@@ -1,4 +1,4 @@
1
- <script server lang="ts">
1
+ <script server>
2
2
  // locals.t and locals.locale are injected by the i18n runtime once i18n is
3
3
  // declared in apex.config.ts. Translation happens on the server, so the HTML
4
4
  // arrives already localized — great for SEO.