@strav/spring 0.3.5 → 0.3.7

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": "@strav/spring",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "type": "module",
5
5
  "description": "Flagship framework scaffolding tool for the Strav ecosystem.",
6
6
  "license": "MIT",
@@ -22,7 +22,7 @@
22
22
  "README.md"
23
23
  ],
24
24
  "dependencies": {
25
- "@strav/kernel": "0.3.5"
25
+ "@strav/kernel": "0.3.7"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/bun": "latest"
@@ -3,10 +3,17 @@ import { app } from '@strav/kernel'
3
3
  import { IslandBuilder, ViewEngine } from '@strav/view'
4
4
  import { providers } from './start/providers'
5
5
 
6
- // Build islands + CSS before the server starts so they're included in the public/ scan
6
+ // Build islands + CSS before the server starts
7
+ // Outputs: public/css/app.css (from SCSS) and public/builds/islands.js (Vue components)
7
8
  const builder = new IslandBuilder({
8
- css: { entry: 'resources/css/app.scss' },
9
+ css: {
10
+ entry: 'resources/css/app.scss',
11
+ outDir: './public/css',
12
+ outFile: 'app.css'
13
+ },
14
+ outDir: './public/builds',
9
15
  })
16
+ await builder.build()
10
17
 
11
18
  // Register service providers
12
19
  app
@@ -17,7 +24,6 @@ app
17
24
  builder.watch()
18
25
  ViewEngine.instance.watch()
19
26
  }
20
- await builder.build()
21
27
  })
22
28
 
23
29
  // Load routes
@@ -0,0 +1 @@
1
+ # This directory will contain compiled Vue islands and manifest files
@@ -0,0 +1 @@
1
+ # This directory will contain compiled CSS files
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <div>
3
+ <p>Vue Island</p>
4
+ <p>Current count: {{ count }}</p>
5
+ <button @click="increment">Increment</button>
6
+ </div>
7
+ </template>
8
+ <script setup lang="ts">
9
+ import { ref } from 'vue'
10
+
11
+ const count = ref(0)
12
+
13
+ const increment = () => {
14
+ count.value++
15
+ }
16
+ </script>
17
+ <style scoped>
18
+ div {
19
+ border: 1px solid var(--bg-feature);
20
+ padding: 10px;
21
+ border-radius: 5px;
22
+ margin: 20px 0;
23
+ }
24
+ h1 {
25
+ color: red;
26
+ font-size: 18px;
27
+ }
28
+ button {
29
+ padding: 5px 10px;
30
+ }
31
+ </style>
@@ -6,8 +6,8 @@ import { ViewProvider } from '@strav/view'
6
6
  export const providers: ServiceProvider[] = [
7
7
  new ConfigProvider(),
8
8
  new HttpProvider(),
9
- new DatabaseProvider(),
9
+ // new DatabaseProvider(),
10
10
  new EncryptionProvider(),
11
- new SessionProvider(),
11
+ // new SessionProvider(),
12
12
  new ViewProvider(),
13
13
  ]
@@ -1,14 +0,0 @@
1
- APP_ENV=local
2
- APP_KEY=__APP_KEY__
3
- APP_DEBUG=true
4
- APP_URL=http://localhost:3000
5
- APP_PORT=3000
6
-
7
- DB_HOST=127.0.0.1
8
- DB_PORT=5432
9
- DB_USER=liva
10
- DB_PASSWORD=password1234
11
- DB_DATABASE=__DB_NAME__
12
-
13
- SESSION_SECRET=__APP_KEY__
14
- SESSION_COOKIE_NAME=session
@@ -1 +0,0 @@
1
- # This file keeps the cache directory in git
@@ -1 +0,0 @@
1
- # This file keeps the logs directory in git