File tree Expand file tree Collapse file tree 12 files changed +123
-8
lines changed Expand file tree Collapse file tree 12 files changed +123
-8
lines changed Original file line number Diff line number Diff line change
1
+ import { defineNitroConfig } from 'nitropack'
2
+ // import { deploy } from '@stacksjs/config'
3
+ import { alias } from '@stacksjs/alias'
4
+ // import { resolve } from '@stacksjs/path'
5
+
6
+ // eslint-disable-next-line no-console
7
+ console . log ( 'here' , alias )
8
+
9
+ export default defineNitroConfig ( {
10
+ // alias,
11
+ preset : 'aws-lambda' ,
12
+ srcDir : './' ,
13
+ } )
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " api" ,
3
+ "type" : " module" ,
4
+ "version" : " 0.51.0" ,
5
+ "packageManager" : " pnpm@7.27.0" ,
6
+ "description" : " The Stacks generated API server." ,
7
+ "author" : " Chris Breuer" ,
8
+ "license" : " MIT" ,
9
+ "funding" : " https://github.com/sponsors/chrisbbreuer" ,
10
+ "homepage" : " https://github.com/stacksjs/stacks/tree/main/.stacks#readme" ,
11
+ "repository" : {
12
+ "type" : " git" ,
13
+ "url" : " git+https://github.com/stacksjs/stacks.git" ,
14
+ "directory" : " ./.stacks/api"
15
+ },
16
+ "bugs" : {
17
+ "url" : " https://github.com/stacksjs/stacks/issues"
18
+ },
19
+ "keywords" : [
20
+ " api" ,
21
+ " vite" ,
22
+ " composables" ,
23
+ " headless" ,
24
+ " modern" ,
25
+ " typescript"
26
+ ],
27
+ "contributors" : [
28
+ " Chris Breuer <chris@ow3.org>"
29
+ ],
30
+ "engines" : {
31
+ "node" : " >=v18.14.0" ,
32
+ "pnpm" : " >=7.27.0"
33
+ },
34
+ "scripts" : {
35
+ "dev" : " npx nitropack dev" ,
36
+ "build" : " npx nitropack build" ,
37
+ "preview" : " " ,
38
+ "deploy" : " "
39
+ },
40
+ "dependencies" : {
41
+ "@stacksjs/alias" : " workspace:*" ,
42
+ "@stacksjs/config" : " workspace:*" ,
43
+ "@stacksjs/path" : " workspace:*" ,
44
+ "@stacksjs/server" : " workspace:*"
45
+ }
46
+ }
Original file line number Diff line number Diff line change
1
+ export default defineEventHandler ( ( ) => '.stacks is amazing!' )
Original file line number Diff line number Diff line change @@ -2,5 +2,6 @@ import { defineNitroConfig } from 'nitropack'
2
2
import { projectPath } from '@stacksjs/path'
3
3
4
4
export default defineNitroConfig ( {
5
+ preset : 'aws-lambda' ,
5
6
srcDir : projectPath ( ) ,
6
7
} )
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ export interface DeployOptions {
4
4
*
5
5
* The host to deploy to.
6
6
*
7
- * @default string 'netlify '
7
+ * @default string 'aws '
8
8
* @see https://stacksjs.dev/docs/components
9
9
*/
10
- driver : 'netlify' | 'vercel'
10
+ driver : 'netlify' | 'vercel' | 'aws' | 'cloudflare' | 'azure' | 'digital-ocean'
11
11
}
Original file line number Diff line number Diff line change @@ -8,5 +8,5 @@ import type { DeployOptions } from '@stacksjs/types'
8
8
* you have any questions, feel free to reach out via Discord or GitHub Discussions.
9
9
*/
10
10
export default < DeployOptions > {
11
- driver : 'netlify ' ,
11
+ driver : 'aws ' ,
12
12
}
Original file line number Diff line number Diff line change 1
1
import { type DocsConfig } from '@stacksjs/types'
2
2
import { frameworkPath } from '@stacksjs/path'
3
+ import type { PluginOption } from 'vite'
3
4
import services from './services'
4
5
6
+ function CustomHmr ( ) : PluginOption {
7
+ return {
8
+ name : 'custom-hmr' ,
9
+ enforce : 'post' ,
10
+ // HMR
11
+ handleHotUpdate ( { file, server } ) {
12
+ // eslint-disable-next-line no-console
13
+ console . log ( 'file' , file )
14
+ // eslint-disable-next-line no-console
15
+ console . log ( 'server' , server )
16
+
17
+ // console.log('reloading json file...')
18
+
19
+ server . ws . send ( {
20
+ type : 'full-reload' ,
21
+ path : '*' ,
22
+ } )
23
+ } ,
24
+ }
25
+ }
26
+
5
27
/**
6
28
* **Documentation Options**
7
29
*
@@ -11,7 +33,13 @@ import services from './services'
11
33
*/
12
34
export default < DocsConfig > {
13
35
vite : {
36
+ server : {
37
+ port : 3335 ,
38
+ } ,
14
39
root : frameworkPath ( 'docs' ) ,
40
+ plugins : [
41
+ CustomHmr ( ) ,
42
+ ] ,
15
43
} ,
16
44
outDir : frameworkPath ( 'docs/dist' ) ,
17
45
lang : 'en-US' ,
Original file line number Diff line number Diff line change 1
1
packages :
2
+ - ./.stacks/api
2
3
- ./.stacks/buddy
3
4
- ./.stacks/core/*
4
5
- ./.stacks/components/*
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ import { defineEventHandler } from 'h3'
3
3
4
4
// console.log('HelloWorld', HelloWorld)
5
5
6
- export default defineEventHandler ( ( ) => '<h1>stacks loves nitro !</h1>' )
6
+ export default defineEventHandler ( ( ) => '<h1>I love Stacks !</h1>' )
You can’t perform that action at this time.
0 commit comments