@gasket/template-nextjs-express 0.0.0-canary-20251110223653 → 0.0.0-canary-20260205164348
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 +2 -4
- package/template/gasket.ts +2 -1
- package/template/package-lock.json +3476 -2307
- package/template/package.json +6 -5
- package/template/pages/_app.tsx +11 -4
- package/template/pages/index.tsx +5 -1
- /package/template/{.gitignore → .gitignore.template} +0 -0
- /package/template/{.npmrc → .npmrc.template} +0 -0
package/template/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "Gasket App",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"docs": "tsx gasket.ts docs",
|
|
7
|
-
"build": "npm run build:tsc && next build",
|
|
7
|
+
"build": "npm run build:tsc && next build --webpack",
|
|
8
8
|
"start": "node dist/server.js",
|
|
9
9
|
"local": "concurrently \"npm run build:tsc:watch\" \"GASKET_DEV=1 tsx watch server.ts\"",
|
|
10
10
|
"preview": "npm run build && npm run start",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"@gasket/assets": "^7.4.3",
|
|
23
23
|
"@gasket/core": "^7.5.2",
|
|
24
24
|
"@gasket/intl": "^7.5.2",
|
|
25
|
-
"@gasket/nextjs": "
|
|
25
|
+
"@gasket/nextjs": "canary",
|
|
26
26
|
"@gasket/plugin-command": "^7.5.2",
|
|
27
27
|
"@gasket/plugin-dynamic-plugins": "^7.4.1",
|
|
28
28
|
"@gasket/plugin-express": "^7.4.3",
|
|
29
29
|
"@gasket/plugin-https": "^7.3.11",
|
|
30
30
|
"@gasket/plugin-intl": "^7.5.8",
|
|
31
31
|
"@gasket/plugin-logger": "^7.3.7",
|
|
32
|
-
"@gasket/plugin-nextjs": "
|
|
32
|
+
"@gasket/plugin-nextjs": "canary",
|
|
33
33
|
"@gasket/plugin-webpack": "^7.3.8",
|
|
34
34
|
"@gasket/plugin-winston": "^7.3.7",
|
|
35
35
|
"@gasket/react-intl": "^7.6.3",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@gasket/utils": "^7.4.2",
|
|
38
38
|
"@types/react": "^19.0.12",
|
|
39
39
|
"express": "^4.21.2",
|
|
40
|
-
"next": "^
|
|
40
|
+
"next": "^16.0.0",
|
|
41
41
|
"react": "^19.0.0",
|
|
42
42
|
"react-dom": "^19.0.0",
|
|
43
43
|
"react-intl": "^7.1.6",
|
|
@@ -74,7 +74,8 @@
|
|
|
74
74
|
"eslintIgnore": [
|
|
75
75
|
"dist",
|
|
76
76
|
"coverage/",
|
|
77
|
-
"build/"
|
|
77
|
+
"build/",
|
|
78
|
+
"next-env.d.ts"
|
|
78
79
|
],
|
|
79
80
|
"eslintConfig": {
|
|
80
81
|
"extends": [
|
package/template/pages/_app.tsx
CHANGED
|
@@ -6,13 +6,20 @@ import intlManager from '../intl';
|
|
|
6
6
|
|
|
7
7
|
const IntlMessagesProvider = withMessagesProvider(intlManager)(IntlProvider);
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Simple functional App component which can be wrapped
|
|
11
|
+
* @see https://nextjs.org/docs/pages/building-your-application/routing/custom-app
|
|
12
|
+
* @param {object} props - Component props
|
|
13
|
+
* @param {React.ComponentType} props.Component - Page component
|
|
14
|
+
* @param {object} props.pageProps - Page props
|
|
15
|
+
* @returns {React.ReactElement} App component
|
|
16
|
+
*/
|
|
17
|
+
function App({ Component, pageProps }: { Component: React.ComponentType; pageProps: object; }): React.ReactElement {
|
|
12
18
|
const router = useRouter();
|
|
19
|
+
const locale = router.locale ?? 'en-US';
|
|
13
20
|
|
|
14
21
|
return (
|
|
15
|
-
<IntlMessagesProvider locale={
|
|
22
|
+
<IntlMessagesProvider locale={ locale }>
|
|
16
23
|
<Component { ...pageProps } />
|
|
17
24
|
</IntlMessagesProvider>
|
|
18
25
|
);
|
package/template/pages/index.tsx
CHANGED
|
@@ -6,7 +6,11 @@ import GasketEmblem from '@gasket/assets/react/gasket-emblem.js';
|
|
|
6
6
|
const pageStyle: CSSProperties = { textAlign: 'center' };
|
|
7
7
|
const logoStyle: CSSProperties = { width: '250px', height: '250px' };
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Index page component
|
|
11
|
+
* @returns {React.ReactElement} Index page
|
|
12
|
+
*/
|
|
13
|
+
function IndexPage(): React.ReactElement {
|
|
10
14
|
return (
|
|
11
15
|
<div style={ pageStyle }>
|
|
12
16
|
<Head title='{{{appName}}}' description='Gasket App'/>
|
|
File without changes
|
|
File without changes
|