@finesoft/create-app 0.1.5 → 0.1.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 +1 -1
- package/templates/react/package.json +1 -1
- package/templates/react/src/ssr.tsx +1 -1
- package/templates/react/tsconfig.json +7 -1
- package/templates/react-minimal/package.json +1 -1
- package/templates/react-minimal/src/ssr.tsx +1 -1
- package/templates/react-minimal/tsconfig.json +7 -1
- package/templates/svelte/package.json +1 -1
- package/templates/svelte/src/lib/render.ts +3 -3
- package/templates/svelte/tsconfig.json +7 -1
- package/templates/svelte-minimal/package.json +1 -1
- package/templates/svelte-minimal/src/lib/render.ts +3 -3
- package/templates/svelte-minimal/tsconfig.json +7 -1
- package/templates/vue/package.json +1 -1
- package/templates/vue/src/ssr.ts +1 -1
- package/templates/vue/tsconfig.json +7 -1
- package/templates/vue-minimal/package.json +1 -1
- package/templates/vue-minimal/src/ssr.ts +1 -1
- package/templates/vue-minimal/tsconfig.json +7 -1
package/package.json
CHANGED
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
"skipLibCheck": true,
|
|
11
11
|
"noEmit": true,
|
|
12
12
|
"paths": {
|
|
13
|
-
"@/*": ["./src/*"]
|
|
13
|
+
"@/*": ["./src/*"],
|
|
14
|
+
"@finesoft/front": ["../../packages/front/src/index.ts"],
|
|
15
|
+
"@finesoft/front/browser": ["../../packages/front/src/browser.ts"],
|
|
16
|
+
"@finesoft/core": ["../../packages/core/src/index.ts"],
|
|
17
|
+
"@finesoft/browser": ["../../packages/browser/src/index.ts"],
|
|
18
|
+
"@finesoft/ssr": ["../../packages/ssr/src/index.ts"],
|
|
19
|
+
"@finesoft/server": ["../../packages/server/src/index.ts"]
|
|
14
20
|
}
|
|
15
21
|
},
|
|
16
22
|
"include": ["src/**/*", "env.d.ts"]
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
"skipLibCheck": true,
|
|
11
11
|
"noEmit": true,
|
|
12
12
|
"paths": {
|
|
13
|
-
"@/*": ["./src/*"]
|
|
13
|
+
"@/*": ["./src/*"],
|
|
14
|
+
"@finesoft/front": ["../../packages/front/src/index.ts"],
|
|
15
|
+
"@finesoft/front/browser": ["../../packages/front/src/browser.ts"],
|
|
16
|
+
"@finesoft/core": ["../../packages/core/src/index.ts"],
|
|
17
|
+
"@finesoft/browser": ["../../packages/browser/src/index.ts"],
|
|
18
|
+
"@finesoft/ssr": ["../../packages/ssr/src/index.ts"],
|
|
19
|
+
"@finesoft/server": ["../../packages/server/src/index.ts"]
|
|
14
20
|
}
|
|
15
21
|
},
|
|
16
22
|
"include": ["src/**/*", "env.d.ts"]
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { BasePage } from "@finesoft/front";
|
|
1
|
+
import type { BasePage, Framework } from "@finesoft/front";
|
|
2
2
|
import { render } from "svelte/server";
|
|
3
3
|
import App from "../App.svelte";
|
|
4
4
|
import type { AppPage } from "./models/product";
|
|
5
5
|
|
|
6
|
-
export function renderApp(page: BasePage) {
|
|
7
|
-
const result = render(App, { props: { page: page as AppPage } });
|
|
6
|
+
export function renderApp(page: BasePage, framework: Framework) {
|
|
7
|
+
const result = render(App, { props: { page: page as AppPage, framework } });
|
|
8
8
|
return {
|
|
9
9
|
html: result.body ?? "",
|
|
10
10
|
head: `<title>${page.title}</title><meta name="description" content="${
|
|
@@ -9,7 +9,13 @@
|
|
|
9
9
|
"skipLibCheck": true,
|
|
10
10
|
"noEmit": true,
|
|
11
11
|
"paths": {
|
|
12
|
-
"@/*": ["./src/*"]
|
|
12
|
+
"@/*": ["./src/*"],
|
|
13
|
+
"@finesoft/front": ["../../packages/front/src/index.ts"],
|
|
14
|
+
"@finesoft/front/browser": ["../../packages/front/src/browser.ts"],
|
|
15
|
+
"@finesoft/core": ["../../packages/core/src/index.ts"],
|
|
16
|
+
"@finesoft/browser": ["../../packages/browser/src/index.ts"],
|
|
17
|
+
"@finesoft/ssr": ["../../packages/ssr/src/index.ts"],
|
|
18
|
+
"@finesoft/server": ["../../packages/server/src/index.ts"]
|
|
13
19
|
}
|
|
14
20
|
},
|
|
15
21
|
"include": ["src/**/*", "env.d.ts"]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { BasePage } from "@finesoft/front";
|
|
1
|
+
import type { BasePage, Framework } from "@finesoft/front";
|
|
2
2
|
import { render } from "svelte/server";
|
|
3
3
|
import App from "../App.svelte";
|
|
4
4
|
|
|
5
|
-
export function renderApp(page: BasePage) {
|
|
6
|
-
const result = render(App, { props: { page } });
|
|
5
|
+
export function renderApp(page: BasePage, framework: Framework) {
|
|
6
|
+
const result = render(App, { props: { page, framework } });
|
|
7
7
|
return {
|
|
8
8
|
html: result.body ?? "",
|
|
9
9
|
head: `<title>${page.title}</title>${result.head ?? ""}`,
|
|
@@ -9,7 +9,13 @@
|
|
|
9
9
|
"skipLibCheck": true,
|
|
10
10
|
"noEmit": true,
|
|
11
11
|
"paths": {
|
|
12
|
-
"@/*": ["./src/*"]
|
|
12
|
+
"@/*": ["./src/*"],
|
|
13
|
+
"@finesoft/front": ["../../packages/front/src/index.ts"],
|
|
14
|
+
"@finesoft/front/browser": ["../../packages/front/src/browser.ts"],
|
|
15
|
+
"@finesoft/core": ["../../packages/core/src/index.ts"],
|
|
16
|
+
"@finesoft/browser": ["../../packages/browser/src/index.ts"],
|
|
17
|
+
"@finesoft/ssr": ["../../packages/ssr/src/index.ts"],
|
|
18
|
+
"@finesoft/server": ["../../packages/server/src/index.ts"]
|
|
13
19
|
}
|
|
14
20
|
},
|
|
15
21
|
"include": ["src/**/*", "env.d.ts"]
|
package/templates/vue/src/ssr.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { getErrorPage } from "./lib/controllers/error";
|
|
|
8
8
|
export const render = createSSRRender({
|
|
9
9
|
bootstrap,
|
|
10
10
|
getErrorPage,
|
|
11
|
-
async renderApp(page) {
|
|
11
|
+
async renderApp(page, _framework) {
|
|
12
12
|
const app = createSSRApp(App, { page });
|
|
13
13
|
const html = await renderToString(app);
|
|
14
14
|
return {
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
"skipLibCheck": true,
|
|
11
11
|
"noEmit": true,
|
|
12
12
|
"paths": {
|
|
13
|
-
"@/*": ["./src/*"]
|
|
13
|
+
"@/*": ["./src/*"],
|
|
14
|
+
"@finesoft/front": ["../../packages/front/src/index.ts"],
|
|
15
|
+
"@finesoft/front/browser": ["../../packages/front/src/browser.ts"],
|
|
16
|
+
"@finesoft/core": ["../../packages/core/src/index.ts"],
|
|
17
|
+
"@finesoft/browser": ["../../packages/browser/src/index.ts"],
|
|
18
|
+
"@finesoft/ssr": ["../../packages/ssr/src/index.ts"],
|
|
19
|
+
"@finesoft/server": ["../../packages/server/src/index.ts"]
|
|
14
20
|
}
|
|
15
21
|
},
|
|
16
22
|
"include": ["src/**/*", "env.d.ts"]
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
"skipLibCheck": true,
|
|
11
11
|
"noEmit": true,
|
|
12
12
|
"paths": {
|
|
13
|
-
"@/*": ["./src/*"]
|
|
13
|
+
"@/*": ["./src/*"],
|
|
14
|
+
"@finesoft/front": ["../../packages/front/src/index.ts"],
|
|
15
|
+
"@finesoft/front/browser": ["../../packages/front/src/browser.ts"],
|
|
16
|
+
"@finesoft/core": ["../../packages/core/src/index.ts"],
|
|
17
|
+
"@finesoft/browser": ["../../packages/browser/src/index.ts"],
|
|
18
|
+
"@finesoft/ssr": ["../../packages/ssr/src/index.ts"],
|
|
19
|
+
"@finesoft/server": ["../../packages/server/src/index.ts"]
|
|
14
20
|
}
|
|
15
21
|
},
|
|
16
22
|
"include": ["src/**/*", "env.d.ts"]
|