From 1284ed6e3ced05042f47f24c048d4ffda9a1362a Mon Sep 17 00:00:00 2001 From: Maxim Kremnev Date: Tue, 20 Oct 2020 21:49:48 +0300 Subject: [PATCH 1/5] Installing npm package nextjs and configuring package.json --- package.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 5e24a7b..559f5db 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,10 @@ "loki:update": "npm run build-storybook && npx loki update --requireReference --reactUri file:./storybook-static", "loki:approve": "npx loki approve", "test:loki": "npm run build-storybook && npx loki --requireReference --reactUri file:./storybook-static", - "heroku-prebuild": "npm install --dev" + "heroku-prebuild": "npm install --dev", + "next:dev": "next", + "next:build": "next", + "next:start": "next" }, "keywords": [ "calculation", @@ -91,6 +94,8 @@ "jest": "^25.5.4", "jest-emotion": "^10.0.32", "loki": "^0.24.0", + "next": "^9.5.5", + "next-redux-wrapper": "^6.0.2", "postcss-loader": "^3.0.0", "prettier": "^2.0.5", "react-test-renderer": "^16.13.1", From b60b5653a4ec3dadfd4ab452c52df114aff42148 Mon Sep 17 00:00:00 2001 From: Maxim Kremnev Date: Tue, 20 Oct 2020 22:21:29 +0300 Subject: [PATCH 2/5] Updating tsconfig --- tsconfig.json | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 8ab7061..f9a4b9f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,20 +1,29 @@ -{ - "compilerOptions": { - "baseUrl": "./" /* Base directory to resolve non-absolute module names. */, - "paths": { - "@types/*": ["src/types/*"], - "@components/*": ["src/components/*"], - "@screens/*": ["src/screens/*"], - "@common/*": ["src/common/*"], - "@/*": ["src/*"] - }, - "downlevelIteration": true, - "target": "ES2018" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, - "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, - "allowJs": true /* Allow javascript files to be compiled. */, - "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, - "sourceMap": true /* Generates corresponding '.map' file. */, - "strict": true /* Enable all strict type-checking options. */, - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - } -} +{ + "compilerOptions": { + "baseUrl": "./" /* Base directory to resolve non-absolute module names. */, + "paths": { + "@/types/*": ["src/types/*"], + "@/components/*": ["src/components/*"], + "@/screens/*": ["src/screens/*"], + "@/common/*": ["src/common/*"], + "@/*": ["src/*"] + }, + "downlevelIteration": true, + "target": "ES2018" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, + "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, + "allowJs": true /* Allow javascript files to be compiled. */, + "jsx": "preserve" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, + "sourceMap": true /* Generates corresponding '.map' file. */, + "strict": true /* Enable all strict type-checking options. */, + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, + "lib": ["dom", "dom.iterable", "esnext"], + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] +} From ce19c05f789a43579cf396981b6f5aa9e681818f Mon Sep 17 00:00:00 2001 From: Maxim Kremnev Date: Tue, 20 Oct 2020 22:21:52 +0300 Subject: [PATCH 3/5] Creating next-env --- next-env.d.ts | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 next-env.d.ts diff --git a/next-env.d.ts b/next-env.d.ts new file mode 100644 index 0000000..7b7aa2c --- /dev/null +++ b/next-env.d.ts @@ -0,0 +1,2 @@ +/// +/// From a780b68958ad5e02fa99f4b47156ed983b8ad459 Mon Sep 17 00:00:00 2001 From: Maxim Kremnev Date: Tue, 20 Oct 2020 22:23:16 +0300 Subject: [PATCH 4/5] Rendering component GameofLifeProto through Nextjs --- src/pages/index.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/pages/index.tsx diff --git a/src/pages/index.tsx b/src/pages/index.tsx new file mode 100644 index 0000000..f50c0b6 --- /dev/null +++ b/src/pages/index.tsx @@ -0,0 +1,11 @@ +import React from 'react'; +import { GameOfLifeProto } from '@/modules/Main/GameOfLifeProto'; +import { Field } from '@/components/Field/Field'; + +export default class extends React.Component { + render() { + return ( + + ); + } +} From e725fdd48a7ca68acf061cc0c440e4f18af58419 Mon Sep 17 00:00:00 2001 From: Maxim Kremnev Date: Tue, 20 Oct 2020 22:31:46 +0300 Subject: [PATCH 5/5] Updating package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 559f5db..1a1b627 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "test:loki": "npm run build-storybook && npx loki --requireReference --reactUri file:./storybook-static", "heroku-prebuild": "npm install --dev", "next:dev": "next", - "next:build": "next", - "next:start": "next" + "next:build": "next build", + "next:start": "next start" }, "keywords": [ "calculation",